wasm-rpc
v0.2.2
Published
Run WebAssembly without having to worry about array buffers or memory managment
Readme
SimpleWASM
SimpleWasm lets you execute WASM code without worrying about array buffers or memory management.
Installation
Using npm:
$ npm i --save simple-wasmUsage
async function run() {
const Promise = require("bluebird");
const readFile = Promise.promisify(require("fs").readFile);
wasm = new SimpleWasm({
exports: {
log: console.log
}
});
code = await readFile("./myprogram.wasm");
await wasm.load(code);
wasm.call("sum", [[1, 2, 3], 3]);
# => 6
}
run();For an example of how to generate wasm files check out the test app in this project.
