Explore the vocabulary of the WebAssembly Component Model — WIT interface and world definitions, the canonical ABI for type lowering/lifting, component imports and exports, and composition with wasm-tools.
0 / 5 completed
1 / 5
What is a WIT interface in the WebAssembly Component Model?
WIT (WebAssembly Interface Types) is the IDL for the Component Model. A WIT interface declares named functions with typed parameters and return values using language-neutral types like string, list<u8>, and resource. Components are described by WIT, enabling language-agnostic composition.
2 / 5
What is a world in a WIT file?
A world in WIT defines what a component provides (export) and what it requires (import). For example world http-handler { import wasi:http/types; export handle: func(request: request) -> response; }. Tooling uses the world to generate bindings and verify that a component satisfies its declared interface.
3 / 5
What does the canonical ABI in the WebAssembly Component Model define?
The canonical ABI specifies how WIT types map to core Wasm values when crossing component boundaries. For example, a string is lifted from a pointer+length pair in linear memory. These rules are implemented in tooling and runtimes so components written in different languages interoperate correctly without handwritten glue code.
4 / 5
What does wasm-tools compose do?
wasm-tools compose takes a set of Wasm components and a configuration that specifies how their interfaces connect, and produces a single composed component. This enables assembling larger applications from smaller, independently-authored components without a host-level orchestrator.
5 / 5
What are imports and exports in the WebAssembly Component Model context?
In the Component Model, imports declare what a component needs (WASI APIs, other component interfaces) and exports declare what it provides. A component is instantiated by satisfying all its imports; it is used by calling its exports. This clear separation enables composition and sandboxing at a granular interface level.