An interface definition language specifies software interfaces independently of implementation languages. In WebAssembly, WebAssembly Interface Types (WIT) defines richer component boundaries while preserving core Wasm’s portability and simple numeric type system. section 2.4
WIT describes values and communication across Wasm boundaries, including:
- Primitive interface types such as bool, sized integers, floating-point numbers, characters, and strings. section 2.4
- Compound types such as lists, optional values, results for error handling, and tuples. section 2.4
- Canonical ABI rules for lifting and lowering values between Wasm and hosts or other Wasm guests. section 2.4
A WIT greeting interface
package component:hello-world-guest-wit; world example { export greet: func(name: string) -> string; }
