WIT

Install cargo-component

$ cargo install cargo-component

Create Project

$ cargo component new --lib greeter

Build

$ cargo component build

Host

Prepare

In ./host/js

Transplie

$ jco transpile  ../../greeter/target/wasm32-wasi/debug/greeter.wasm -o greeter

Rename

$ mv greeter/greeter.js greeter/greeter.mjs

Run

$ node index.mjs