跳到主要内容

工具链与开发流程

  • rustup 目标、cargo-component、wasm-tools、wit-bindgen
  • 典型流程:源码 → wasm → 组件化 → 组合/运行
  • 示例:见 examples/ch03examples/ch05

开发流水线(示意)

常用命令片段:

rustup target add wasm32-wasi
cargo build --release --target wasm32-wasi
wasm-tools component new a.wasm -o a.component.wasm
wasm-tools component wit a.component.wasm