Closed
Description
In attempting to load a wasm2js-generated js file on graaljs, I hit the following error:
failed to compile wasm module: TypeError: Cannot read property 'buffer' of undefined
Execution error (PolyglotException) at <js>/asmFunc (src.js:493).
TypeError: Cannot read property 'buffer' of undefined
It's referring to these lines in the transpiled js, implying that the env.memory section is undefined.
function asmFunc(env) {
var memory = env.memory;
var buffer = memory.buffer;
This error occurs when using the shell environment, which I suppose graal isn't, but running the transpilation without setting an env fails with Aborted(Assertion failed: shell environment detected but not enabled at build time. Add 'shell' to
-sENVIRONMENT to enable.)
Should I be using a different environment, does this mean that the shell environment needs something else to generate a WebAssembly.Memory
, or does there need to be an entirely new graal environment?
Metadata
Metadata
Assignees
Labels
No labels