Skip to main content
Bailey Hayes
Bailey Hayes
Bailey Hayes
||2 min read

Get WITtier with this handy guide to Wasm Interface Types

WIT, or Wasm Interface Types, allows WebAssembly modules to communicate with each other using complex data types. WIT is a language agnostic interface definition language (IDL) that enables composing WebAssembly components, regardless of source language, using language-specific bindings. If you're using a WIT-generated set of language bindings it will feel just like using a regular language SDK. If you're writing your own WIT, then this guide is for you!

Working with WIT allows us to connect multi-language components and dynamically swap out those components, according to the needs of our microservice or application. The importance of WIT can’t be understated so we put together this handy cheatsheet which guides you through the WIT syntax, available types and most commonly used interfaces when it comes to Wasm application development.

If you’re interested in learning more, visit Alex Crichton’s excellent documentation which explains the ways in which the WIT IDL supports the WebAssembly Component Model:

  • WIT is a developer-friendly format to describe the imports and exports to a component. It is easy to read and write and provides the foundational basis for producing components from guest languages as well as consuming components in host languages.
  • WIT packages are the basis of sharing types and definitions in an ecosystem of components. Authors can import types from other WIT packages when generating a component, publish a WIT package representing a host embedding, or collaborate on a WIT definition of a shared set of APIs between platforms.

Got questions? There are lots of ways to get in touch, contribute and join the discussion.

  • As maintainers of CNCF wasmCloud, we hold weekly Community Meetings which are live-streamed on YouTube, LinkedIn and Twitter. You can find out what’s coming up on the agenda.
  • We’ll be at KubeCon Chicago — come visit us at the Cosmonic booth M21 and wasmCloud booth in the open source pavilion.
  • Join the discussion on Discord

Want to send your application into orbit?

Get in touch for a demo
Book Now

Keep up to date

Subscribe to Cosmonic for occasional communication straight to your inbox.