Cargo.toml and wit/world.wit live.
You do not need
cargo-component. With crate-type = ["cdylib", "lib"] in Cargo.toml, the wasm32-wasip2 target emits a WASM component that T3N can inspect and register.Build the release artifact
Install the WASI Preview 2 target once per machine, then build the release artifact:target/wasm32-wasip2/release/. If your package name contains hyphens, Cargo converts them to underscores in the file name. For the sample your-contract package, the output is:
.wasm file is the artifact you pass to tenant.contracts.register in Step 3.
Verify the component interface
Usewasm-tools to print the component’s WIT interface:
wit/world.wit, such as t3n:host/kv-store, and the contract entry point:
wasm-tools is not installed yet: