Skip to content

Latest commit

 

History

History
21 lines (15 loc) · 402 Bytes

README.md

File metadata and controls

21 lines (15 loc) · 402 Bytes

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();