wasmcloud.toml is the component manifest: a small declaration that identifies a wasmCloud component and connects its interface world to its Wasm build target. It keeps component-level build metadata separate from application deployment topology, which is described in wadm.yaml. section 6.1 section 6.6
Listing 6.2 hello-world-wasmcloud’s wasmcloud.toml file
name = "http-hello-world" version = "0.1.0" language = "rust" type = "component" [component] wit_world = "hello" wasm_target = "wasm32-wasip2"
A minimal HTTP component manifest names a Rust component, declares it as a component, selects the hello WIT world, and targets wasm32-wasip2. section 6.1
A manifest shown here declares:
- Identity metadata: name, version, language, and type. section 6.1
- The WIT world implemented by the component through component.wit_world. section 6.1
- The Wasm compilation target through component.wasm_target; wasm32-wasip2 corresponds to WASI 0.2. section 6.1
The WIT world is the interface contract, while wasmcloud.toml selects that world for compilation. For an HTTP component, the selected world exports the WASI HTTP incoming-handler interface; deployment then links that interface to an HTTP server capability in wadm.yaml. section 6.1 section 6.1
Renaming a component for SmartCMS
After creating a Rust component from the Hello World template, set name to "smart-cms" and point wit_world to "backend". The target remains wasm32-wasip2, while Cargo.toml is updated separately to use the SmartCMS package name. section 6.6 section 6.6
Listing 6.15 Updated application name in wasmcloud.toml
name = "smart-cms" version = "0.1.0" language = "rust" type = "component" [component] wit_world = "backend" #1 wasm_target = "wasm32-wasip2"
The SmartCMS manifest shows the same component metadata and WASI 0.2 target with a project-specific name and WIT world. section 6.6
