node-wasm

0.1.4 • Public • Published

node-wasm

npm version npm downloads npm npm

Bare minimum util to import and use wasm in node 👏

This is still work in progress.

Installation

yarn add node-wasm

Quickstart

import loadWasm from 'node-wasm';
 
async function run() {
  const {rust_function} = await loadWasm('/local/path/to/wasm');
  const result = rust_function();
  console.log(result);
}
 
run();

Example

Check the node example for a simple demo.

The corresponding rust example is also available for you to play with.

Dependencies (0)

    Dev Dependencies (5)

    Package Sidebar

    Install

    npm i node-wasm

    Weekly Downloads

    307

    Version

    0.1.4

    License

    ISC

    Unpacked Size

    29.7 MB

    Total Files

    13759

    Last publish

    Collaborators

    • yusinto