This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Usage: $jsshell ./compile.js /path/to/wasm-binary.wasm | |
if (scriptArgs.length !== 1) { | |
console.log('one argument required: path to wasm binary'); | |
} | |
let pathToBinary = scriptArgs[0]; | |
let binary; | |
try { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (scriptArgs.length < 1) { | |
console.log('path to a wasm binary is required'); | |
quit(-1); | |
} | |
let binary = os.file.readFile(scriptArgs[0], 'binary'); | |
// If the wasm instance expects imported functions from js, put them in here. | |
// let maybeImports = { std: { f: function() { }} }; | |
let maybeImports; |
OlderNewer