WIT Packages
A WIT package is a set of one or more WebAssembly Interface Type (WIT) files that, taken together, contain a set of interfaces and worlds that are related to each other. WIT is an interface definition language (IDL) for the component model. Packages provide a way for worlds and interfaces to refer to each other, and thus for an ecosystem of components to share common definitions.
A WIT package groups related interfaces and worlds together for ease of discovery and reference. A package is not a world: a package maps to one or more files and contains worlds. A world is a bundle of imported and exported types and interfaces.
- The WebAssembly System Interface (WASI) defines a number of packages,
including one named
wasi:clocks
. Our HTTP proxy world could import thewasi:clocks/wall-clock
interface (read as "thewall-clock
interface from thewasi:clocks
package"), rather than having to define a custom clock interface.
For a more formal definition of what a WIT package is, take a look at the WIT specification.