Skip to content

Fixed missing exports in asinit #1325

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ under the licensing terms detailed in LICENSE:
* Surma <[email protected]>
* Julien Letellier <[email protected]>
* Guido Zuidhof <[email protected]>
* ncave <[email protected]>

Portions of this software are derived from third-party works licensed under
the following terms:
Expand Down
4 changes: 3 additions & 1 deletion bin/asinit
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,9 @@ function ensureIndexJs() {
fs.writeFileSync(indexFile, [
"const fs = require(\"fs\");",
"const loader = require(\"@assemblyscript/loader\");",
"module.exports = loader.instantiateSync(fs.readFileSync(__dirname + \"/build/optimized.wasm\"), { /* imports */ })"
"const imports = { /* imports go here */ };",
"const wasmModule = loader.instantiateSync(fs.readFileSync(__dirname + \"/build/optimized.wasm\"), imports);",
"module.exports = wasmModule.exports;"
].join("\n") + "\n");
console.log(colors.green(" Created: ") + indexFile);
} else {
Expand Down