WIT Contracts
WIT Contracts
Dalang uses WebAssembly Interface Types (WIT) to define component contracts. Each package versions independently and is consumed via wit-deps without pulling unrelated types.
Packages
dalang-http
Defines HTTP request/response types for Wasm components handling inbound traffic.
Source: product/wit/dalang-http/world.wit
dalang-event
Defines event types for the asynchronous event bus between components.
Source: product/wit/dalang-event/world.wit
dalang-state
Defines state management types for persistent component state.
Source: product/wit/dalang-state/world.wit
Consuming
Internal Rust crates consume WIT packages via wit-bindgen:
wit_bindgen::generate!({ path: "../../wit/dalang-http", world: "dalang-http-world"});External SDKs will provide language-specific bindings generated from these contracts.