devsnek / node-wasi

WASI for Node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

node-wasi

This module and WASI are still in early development!

Expect bugs and breaking changes!

A module to use WASI modules with Node.js.

const WASI = require('wasi');

const wasi = new WASI({
  // preopenDirectories: { '.': '.' },
});

const inst = new WebAssembly.Instance(module, {
  wasi_unstable: wasi.exports,
});
wasi.setMemory(inst.exports.memory);

inst.exports._start();

About

WASI for Node.js

License:MIT License


Languages

Language:JavaScript 81.4%Language:C 9.9%Language:C++ 4.7%Language:Rust 3.5%Language:Python 0.6%