Zig Version
0.11.0-dev.1862+e7f128c20
Steps to Reproduce and Observed Behavior
Install above version of zig, and follow the exact steps in the WebAssembly documentation.
You will get:
$ node test.js
/Users/jim/dev/tmp/test-wasm-bug/test.js:10
add(1, 2);
^
TypeError: add is not a function
at /Users/jim/dev/tmp/test-wasm-bug/test.js:10:3
Node.js v19.5.0
This is because the built math.wasm is basically empty:
$ npm i wabt
$ npx wasm2wat math.wasm
(module
(memory (;0;) 16)
(global $__stack_pointer (mut i32) (i32.const 1048576))
(export "memory" (memory 0)))
I know this worked on a zig 0.10.x build.
Expected Behavior
The output shown in the documentation:
$ node test.js
The result is 3
Zig Version
0.11.0-dev.1862+e7f128c20
Steps to Reproduce and Observed Behavior
Install above version of zig, and follow the exact steps in the WebAssembly documentation.
You will get:
This is because the built
math.wasmis basically empty:I know this worked on a zig 0.10.x build.
Expected Behavior
The output shown in the documentation: