Socket
Socket
Sign inDemoInstall

node-wasm

Package Overview
Dependencies
169
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    node-wasm

A bare minimum util to import and use wasm in node


Version published
Maintainers
1
Install size
28.3 MB
Created

Readme

Source

node-wasm

npm version npm downloads npm npm

Bare minimum util to import and use wasm in node :clap:

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.

Keywords

FAQs

Last updated on 17 Feb 2018

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc