Serialization transforms structured data into a representation suitable for storage, transmission, or communication across an application boundary. In WebAssembly components, WIT describes richer interface values, while the Canonical ABI defines how those values are packaged and unpackaged between a module and its host. section 2.4
WIT supports serialization-oriented interface types including:
- Primitive values such as booleans, integers, floating-point numbers, characters, and strings. section 2.4
- Lists, optional values, results, and tuples for collections, absence, errors, and grouped values. section 2.4
- Records, enums, variants, flags, and type aliases for structured application data. section 2.4
A string crossing a Wasm boundary
A WIT world can export greet: func(name: string) -> string. The interface declares the structured values, and the Canonical ABI supplies the agreed rules for converting them between Wasm and the host runtime. section 2.4























