Skip to content

Instantly share code, notes, and snippets.

@ahndmal
Created October 2, 2025 18:52
Show Gist options
  • Select an option

  • Save ahndmal/9f6b0112ccdecbbd54eab3a5b7e8b8b7 to your computer and use it in GitHub Desktop.

Select an option

Save ahndmal/9f6b0112ccdecbbd54eab3a5b7e8b8b7 to your computer and use it in GitHub Desktop.
Install cargo-component:
cargo install --locked cargo-component
Install wasm-tools:
cargo install --locked wasm-tools
Install wasmtime:
curl https://wasmtime.dev/install.sh -sSf | bash
---
bind:
cargo component bindings
build:
cargo component build
run:
wasmtime run --invoke 'hello-world()' ./target/wasm32-wasip1/debug/add.wasm
show wasm file:
wasm-tools component wit target/wasm32-wasip1/release/add.wasm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment