liveBook · Manning

Interface definition language

As explained in Server-Side WebAssembly

An interface definition language is a language for specifying software interfaces independently of implementation programming languages.

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; }

How Server-Side WebAssembly covers it

How deep it goes
Explains interface types, compound values, and Canonical ABI marshaling, but stops short of implementation commands.
Examples
Uses a WIT package defining a world that exports a string-based greeting function.
What it assumes
Assumes familiarity with Wasm numeric types and linear memory while introducing higher-level interface types.
What you can do after
Build language-independent Wasm interfaces using structured values and standardized boundary representations.
How it connects
Connects WebAssembly Interface Types with WebAssembly, linear memory, components, host runtimes, and the Canonical ABI.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Server-Side WebAssembly. The section links point to the parts of the book it draws on.