Closed ChristianWeyer closed 1 year ago
With Wasmtime and most other WebAssembly runners you can specify an arbitrary stack size. I'm not sure if Node.js has an API for that.
Another thing to try is running wasm-opt -Oz yourmodule.wasm -o yourmodule.wasm
and see if the optimized version has lower stack size requirements (https://www.npmjs.com/package/wasm-opt).
Hey Steve,
that did it - but I had to add --enable-bulk-memory
:
wasm-opt -Oz --enable-bulk-memory HelloWASI.wasm -o HelloWASI-o.wasm
Thanks!
Compiled a very simple hello world to .wasm:
Then used a node.js module to host the .wasm module:
Executing this with
node --experimental-wasi-unstable-preview1 --no-warnings wasi-host.mjs
gives the following error:Any idea what could be the issue here? .cc @SteveSandersonMS
.NET 7.0 Wasi.Sdk 0.1.4-preview.10020 nodejs 19.8.1 macOS 13.3.1 Apple ARM M1