Skip to content

guybedford/wasi_unstable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Experimental ESM Integration API for WASI

Wraps https://npmjs.org/package/wasi, created by @devsnek, in an ESM integration API.

Proposed ES Module Integration Usage

Note this API is only an experiment in integrating WASI with the ES Module system in Node.js and is not based on any existing proposal.

npm install wasi_unstable

main.mjs

import * as M from './wasi-file.wasm';
import { run } from 'wasi_unstable';

run(M, {
  // defaults:
  env: process.env,
  args: process.argv.slice(1)
});

Executed with:

node --experimental-modules --experimental-wasm-modules main.mjs

About

WASI Unstable Experimental ES Module Integration

Resources

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published