WebAssembly Interface Type (WIT)

WIT is the interface definition language for the Component Model. WIT describes the imports and exports of a component using interfaces and worlds. WIT is consumed by language toolchains to generate bindings and by runtimes to validate and link components at load time.

API entry from apis.yml

apis.yml Raw ↑
aid: component-model:wit
name: WebAssembly Interface Type (WIT)
description: WIT is the interface definition language for the Component Model. WIT describes the imports
  and exports of a component using interfaces and worlds. WIT is consumed by language toolchains to generate
  bindings and by runtimes to validate and link components at load time.
humanURL: https://component-model.bytecodealliance.org/design/wit.html
baseURL: https://component-model.bytecodealliance.org
tags:
- Bindings
- IDL
- Interface
- WIT
properties:
- type: Documentation
  url: https://component-model.bytecodealliance.org/design/wit.html
- type: Specification
  url: https://github.com/WebAssembly/component-model/blob/main/design/mvp/WIT.md
- type: Reference
  url: https://github.com/bytecodealliance/wit-bindgen
x-features:
- Declarative IDL for components
- Records, variants, enums, flags, options, results
- Resources with methods for borrowed and owned references
- Interfaces compose into worlds
x-useCases:
- Authoring portable component interfaces
- Generating language bindings via wit-bindgen
- Defining stable contracts between platform and components