New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

wasm-rpc

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wasm-rpc

Run WebAssembly without having to worry about array buffers or memory managment

latest
npmnpm
Version
0.2.2
Version published
Maintainers
1
Created
Source

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.

FAQs

Package last updated on 09 Apr 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts