https://component-model.bytecodealliance.org/language-support.html
cargo install wkg
wkg wit fetch
wkg wit build -o wit/demo.wasm
rustup target add wasm32-wasip2
rustup update
cargo build --package demo_guest --target wasm32-wasip2 --release
cargo build --package demo_host --release
./target/release/demo_host target/wasm32-wasip2/release/demo_guest.wasm https://httpbin.org/uuid
npm install -g @bytecodealliance/componentize-js @bytecodealliance/jco
cd guest-js
jco componentize app.js --wit ../wit --world-name demo --out demo_guest.wasm
cd ..
./target/release/demo_host guest-js/demo_guest.wasm https://httpbin.org/uuid
cd guest-go
go install go.bytecodealliance.org/cmd/wit-bindgen-go
wit-bindgen-go generate --world demo -o internal/ ../wit
tinygo build -o demo_guest.wasm -target=wasip2 --wit-package ../wit/demo.wasm --wit-world demo app.go
cd ..
./target/release/demo_host guest-go/demo_guest.wasm https://httpbin.org/uuid
pip install componentize-py
cd guest-python
componentize-py --wit-path ../wit --world demo bindings .
# https://github.com/bytecodealliance/componentize-py/issues/96
componentize-py --wit-path ../wit --world demo componentize app -o demo_guest.wasm
cd ..
./target/release/demo_host guest-python/demo_guest.wasm https://httpbin.org/uuid