Wasm Builders 🧱

Matt Butcher
Matt Butcher

Posted on

What is WASI?

We've likely all heard about WebAssembly, the platform-neutral binary format that runs everywhere from servers to browsers to IoT devices. But what is this WASI thing?

WASI stands for WebAssembly System Interface. It is a standardized extension for WebAssembly, providing support for system facilities.

The first version of WASI (called Preview 1) supported the following system interfaces:

  • Filesystem
  • Random number generator
  • Environment variables
  • Clock

All four of those facilities were implemented to be POSIX-like, which meant programming language libraries that worked on a UNIX operating system were likely to also work on WASI-enabled WebAssembly runtimes.

A new revision of WASI, called Preview 2, adds networking to the list. When it is released, compliant Wasm runtimes will also be able to make outbound network requests.

While WASI was originally intended to be a drop-in POSIX library, the community has largely changed course, believing that the component model (a way to link up Wasm libraries) is a better approach to providing the kinds of services that we as developers need.

For a more detailed explanation of WASI and how it related to WebAssembly and the component model, check out this article I wrote last month.

Top comments (0)