This demo is partially based on instruction for official waki
example.
Tested with Rust 1.83.0, waki examples v0.5.0, Wasmtime v27.0.0.
-
Open this repo in devcontainer, e.g. using Github Codespaces. Type or copy/paste following commands to devcontainer's terminal.
-
Install WASI Preview 2 build target into Rust toolchain:
rustup target add wasm32-wasip2
cd
into the folder of this example:
cd wasi-waki
- Clone the waki repo:
git clone --depth=1 https://github.com/wacker-dev/waki.git
cd
into the folder of HTTP client example:
cd waki/examples/client
- Compile the example:
cargo build --release
- Install Wasmtime:
curl https://wasmtime.dev/install.sh -sSf | bash
- Run Wasmtime with HTTP plugin enabled against just-compiled WASM file:
~/.wasmtime/bin/wasmtime -S http target/wasm32-wasip2/*/http-client.wasm
- See the results in terminal.
Perform your own experiments if desired.