You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should work if you pass in a WebAssembly.Module instance instead of an ArrayBuffer. Confusingly, WebAssembly.instantiate has two different return types, depending on the type of the argument.
Bug description
Expected exports to contain wasm exports, instead getting undefined value.
Steps to reproduce
Run asc with --bindings raw. In build/release.js line 24 now contains:
I think this should instead be
I haven't done a PR before, so I'll describe the proposed change:
In src/bindings/js.ts line 646:
replace sb.push("const { exports } = await WebAssembly.instantiate(module");
with sb.push("const { instance } = await WebAssembly.instantiate(module");
then at line 652 insert:
indent(sb, this.indentLevel);
sb.push("const { exports } = instance.exports;\n");
AssemblyScript version
v0.27.36
The text was updated successfully, but these errors were encountered: