Skip to content

Commit

Permalink
all: Add js wasm for reference
Browse files Browse the repository at this point in the history
  • Loading branch information
losfair committed Jul 27, 2018
1 parent ef86af2 commit d5c0b65
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions exec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const fs = require("fs")

async function run() {
let code = fs.readFileSync(process.argv[2])
let module = await WebAssembly.compile(code)
let instance = await WebAssembly.instantiate(module, {})
let ret = instance.exports.app_main()
console.log(ret)
}

run()

0 comments on commit d5c0b65

Please sign in to comment.