Skip to content
Tech News
← Back to articles

WASI 0.3.0 Released

read original more articles

There was an error while loading. Please reload this page .

This commit was created on GitHub.com and signed with GitHub’s verified signature .

WASI 0.3.0

WASI 0.3 is official, and async is now native to WebAssembly Components. The WASI Subgroup voted to ratify WASI 0.3.0, rebasing WASI onto the WebAssembly Component Model's async primitives.

Most of the changes in the 0.3 interfaces are entirely mechanical. WASI 0.2 had to perform some acrobatics to make async work, but now that async is native to the component model we can write the same things we did before but much more ergonomically. Here is a overview of the patterns we were encoding in WASI 0.2 with the wasi:io package, and what those patterns now look like in 0.3 with Component Model async:

WASI 0.2 ( wasi:io ) WASI 0.3 (Component Model) resource pollable future<T> resource input-stream stream<u8> resource output-stream stream<u8> (written-to direction) poll(list<pollable>) await on a future (runtime-handled) subscribe() on resource return a future<...> from the call start-foo / finish-foo foo: async func(...)

wasi:cli

Structurally the files are the same ( stdin.wit , stdout.wit , stderr.wit ,

run.wit , exit.wit , terminal.wit , environment.wit ). The interesting

change is stdio .

... continue reading