-
-
Notifications
You must be signed in to change notification settings - Fork 684
Open
Labels
Description
Bug description
When I compile a WASM module, there are example.js files in the example.wasm folder.
"example:build:wasm": "asc --config asconfig.json",
Failed to instantiate WASM: TypeError: Cannot read properties of undefined (reading 'memory')
at _c (example.js:76:26)
There is a line like this in the code
const { exports } = await WebAssembly.instantiate(module, adaptedImports);
This is not a valid response.
This response is returned.
{
"module": {},
"instance": {}
}
exports is always undefined
How to solve this problem?
Steps to reproduce
asconfig.json
{
"entries": ["./src/assembly/index.ts"],
"options": {
"outFile": "./src/module/example.wasm",
"target": "release",
"exportRuntime": true,
"bindings": "raw",
"disableWarning": [235],
"optimizeLevel": 3,
"shrinkLevel": 1,
"converge": true,
"noAssert": false,
"runtime": "stub"
}
}
asc --config asconfig.json
AssemblyScript version
0.28.9
Reactions are currently unavailable