Raw bindings get undefined "exports" var #2921
Labels
Content-Length: 223518 | pFad | http://github.com/AssemblyScript/assemblyscript/issues/2921
B5Fetched URL: http://github.com/AssemblyScript/assemblyscript/issues/2921
Alternative Proxies:
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: