Wasmin
a contains a collection of packages and building blocks for running WASI WebAssembly applications on top of JavaScript Runtimes.
Main package implementing the WASI layer is @netapplabs/wasi-js
with support for Preview 1 and experimental support for Preview 2 and component mode.
This repo is structured as a monorepo using Yarn and turborepo.
Each package/app written in TypeScript. It includes the following packages and apps:
@netapplabs/fs-js
: Virtual FileSystem layer based on WHATWG File System Standard@netapplabs/node-fs-js
: Implementation of File System Standard on top of Node File system@netapplabs/bun-fs-js
: Implementation of File System Standard on top of Bun File I/O@netapplabs/deno-fs-js
: Implementation of File System Standard on top of Deno File system APIs@netapplabs/nfs-js
: Implementation of File System Standard for NFSv3 in pure WebAssembly@netapplabs/s3-fs-js
: Implementation of File System Standard for S3 protocol.@netapplabs/wasi-js
: WASI runtime layer written in TypeScript for JavaScript runtimes@netapplabs/shell
: a CLI shell package for wasm/wasi embedding a pre-built Nushell shell compiled to WebAssembly by default.
Following applications are provided as examples for self contained executables built with the packages above.
@netapplabs/node-shell
: a shell for wasm/wasi based on node.js@netapplabs/bun-shell
: a shell for wasm/wasi based on bun.sh@netapplabs/deno-shell
: a shell for wasm/wasi based on deno@netapplabs/web-shell
: a Web shell for wasm/wasi runnable in a Browser.
Make sure you have in your ~/.npmrc
@netapplabs:registry=https://npm.pkg.github.com/
or if you have a GITHUB_TOKEN
//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}
@netapplabs:registry=https://npm.pkg.github.com/
Then add a package e.g. with
yarn add @netapplabs/wasi-js
or
bun add @netapplabs/wasi-js
wasmin
contains pre-built executables as an example built from the apps above in different formats:
docker run -it ghcr.io/netapplabs/wasmin:latest
Type in something like
help commands
to see available commands
docker run -it --mount type=bind,source=/Users/shared,target=/mount ghcr.io/netapplabs/wasmin:latest -p
For prebuilt with bun on macOS Apple Silicon:
wget https://github.com/NetAppLabs/wasmin/releases/download/latest/wasmin-bun-macos-arm64 -O wasmin
chmod +x wasmin
./wasmin -h
For prebuilt with bun on Linux Intel:
wget https://github.com/NetAppLabs/wasmin/releases/download/latest/wasmin-bun-linux-amd64 -O wasmin
chmod +x wasmin
./wasmin -h
For prebuilt with Node on macOS Apple Silicon:
wget https://github.com/NetAppLabs/wasmin/releases/download/latest/wasmin-node-macos-arm64 -O wasmin
chmod +x wasmin
./wasmin -h
For prebuilt with Node on Linux Intel:
wget https://github.com/NetAppLabs/wasmin/releases/download/latest/wasmin-node-linux-amd64 -O wasmin
chmod +x wasmin
./wasmin -h
For prebuilt with Deno on macOS Apple Silicon:
wget https://github.com/NetAppLabs/wasmin/releases/download/latest/wasmin-deno-macos-arm64 -O wasmin
chmod +x wasmin
./wasmin -h
For prebuilt with Deno on Linux Intel:
wget https://github.com/NetAppLabs/wasmin/releases/download/latest/wasmin-deno-linux-amd64 -O wasmin
chmod +x wasmin
./wasmin -h
Clone from github:
git clone git@github.com:NetAppLabs/wasmin.git
To build all apps and packages, run the following command:
cd wasmin
yarn
yarn build
To test all packages, run the following command:
cd wasmin
yarn test
Disclaimer: This is not an officially supported NetApp product.
See Contributing.md