Project templates for building wasmCloud components and services with Rust.
| Template | Description |
|---|---|
| http-hello-world | Minimal HTTP handler component using wstd |
| http-client | Component that makes outgoing HTTP requests |
| http-handler | HTTP handler component with routing via wstd-axum |
| http-kv-handler | HTTP handler component backed by wasi:keyvalue |
| http-api-with-distributed-workloads | HTTP API that delegates processing to background workers via messaging |
| service-tcp | Service-and-component template demonstrating the wasmCloud service model with wasi:sockets and tokio |
Each template follows a similar structure:
template-name/
├── .wash/
│ └── config.yaml # wash CLI configuration
├── src/
│ └── *.rs # Rust source code
├── wit/
│ └── world.wit # Component world definition
└── Cargo.toml # Rust package configuration
Each template may be used with wash new. For example, to create a new project with the service-tcp template:
wash new https://github.com/wasmCloud/wasmCloud.git --name my-service --subfolder templates/service-tcpEvery template follows the convention of namespace as wasmcloud, package as templates, and the world is prefixed with the language. We version our templates for easy future updates (e.g. when adding support for WASIP3).
package wasmcloud:templates@0.1.0;