-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
contributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.This issue is limited in scope and/or knowledge of Zig internals.docsregressionIt worked in a previous version of Zig, but stopped working.It worked in a previous version of Zig, but stopped working.
Milestone
Description
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
contributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.This issue is limited in scope and/or knowledge of Zig internals.docsregressionIt worked in a previous version of Zig, but stopped working.It worked in a previous version of Zig, but stopped working.