0.2.2 • Published 5 years ago

wasm-rpc v0.2.2

Weekly downloads
2
License
MIT
Repository
-
Last release
5 years ago

SimpleWASM

SimpleWasm lets you execute WASM code without worrying about array buffers or memory management.

Installation

Using npm:

$ npm i --save simple-wasm

Usage

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.

0.2.2

5 years ago

0.2.1

5 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago