Skip to content

Releases: WebAssembly/WASI

v0.3.0

Choose a tag to compare

@ricochet ricochet released this 11 Jun 17:06
3ee2a59

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. These are the detailed release notes, for a high-level overview read the announcement post.

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.

// WASI 0.2
interface stdin {
  use wasi:io/streams.{input-stream};
  get-stdin: func() -> input-stream;
}

interface stdout {
  use wasi:io/streams.{output-stream};
  get-stdout: func() -> output-stream;
}

// WASI 0.3
interface stdin {
  use types.{error-code};
  read-via-stream: func() -> tuple<stream<u8>, future<result<_, error-code>>>;
}

interface stdout {
  use types.{error-code};
  write-via-stream: func(data: stream<u8>) -> future<result<_, error-code>>;
}

Note the direction flip on stdout. WASI 0.2 handed you an output-stream that you wrote into imperatively. WASI 0.3 has you pass in a stream<u8> and get back a future that resolves when the write completes. A small new wasi:cli/types interface carries a shared error-code variant (io, illegal-byte-sequence, pipe).

wasi:sockets

The network resource is gone. WASI 0.2 modeled network access as a capability resource threaded through every bind/connect/lookup call. WASI 0.3 removes it entirely; network access is granted via world imports.

Every start/finish pair became one async func. The in-progress intermediate states (bind-in-progress, connect-in-progress, listen-in-progress) and the subscribe() -> pollable that drove them are gone:

// WASI 0.2
start-bind:     func(network: borrow<network>, local: ip-socket-address)
                 -> result<_, error-code>;
finish-bind:    func() -> result<_, error-code>;
start-connect:  func(network: borrow<network>, remote: ip-socket-address)
                 -> result<_, error-code>;
finish-connect: func()
                 -> result<tuple<input-stream, output-stream>, error-code>;

// WASI 0.3
bind:    async func(local-address: ip-socket-address)  -> result<_, error-code>;
connect: async func(remote-address: ip-socket-address) -> result<_, error-code>;
listen:  async func()                                  -> result<_, error-code>;
accept:  async func()
  -> result<tuple<tcp-socket, ip-socket-address>, error-code>;

Note that WASI 0.2's finish-connect returned the TCP stream pair inline. In WASI 0.3 connect returns nothing special; byte I/O lives on the socket resource's own stream methods.

UDP got the same treatment. The incoming/outgoing datagram stream resources are gone, replaced by plain async send and async receive. Error codes across TCP, UDP, and name-lookup were unified into a single error-code variant, with a new connection-broken case and an open-ended other(option<string>) tail.

Changes to wasi:http

The interface that has seen the most change is wasi:http. We haven’t just
mechanically converted poll-based interfaces to native async ones, but actually
reorganized the worlds and changed some of the core abstractions. wasi:http
now exposes two worlds: wasi:http/service and wasi:http/middleware:

interface client { /* ... */ }
interface handler { /* ... */ }

// When used by guest bindings generators, grant the
// ability to make HTTP calls through the `client` import, and
// handle incoming HTTP requests through the `handler` export.
world service {
  import client;
  export handler;
}

// The middleware world is a super-set of the service world.
world middleware {
  include service; // ← Do everything that `service` can do.
  import handler;  // ← But also pass incoming requests down to another handler.
}

The middleware world replaces the 0.2-era proxy world, and is used to define HTTP handlers which can forward requests to other handlers. What’s new in WASI 0.3 is that this can now perform service chaining: a pattern where components can be directly composed with one another. This means components acting as microservices that frequently interop with other microservices, do not need to go over the network. Instead a runtime can choose to directly compose them with each other inside the same process. For most microservices this will reduce the time for calling other microservices from milliseconds to nanoseconds: six orders of magnitude.

wasi:filesystem

Streaming reads/writes switched to the stream-plus-future shape:

// WASI 0.2
read-via-stream:  func(offset: filesize) -> result<input-stream, error-code>;
write-via-stream: func(offset: filesize) -> result<output-stream, error-code>;

// WASI 0.3
read-via-stream:  func(offset: filesize)
  -> tuple<stream<u8>, future<result<_, error-code>>>;
write-via-stream: func(data: stream<u8>, offset: filesize)
  -> future<result<_, error-code>>;

Directory iteration switched from a resource-based iterator to a stream:

// WASI 0.2
read-directory: func() -> result<directory-entry-stream, error-code>;
// plus: resource directory-entry-stream { read-directory-entry: func() -> ... }

// WASI 0.3
read-directory: func()
  -> tuple<stream<directory-entry>, future<result<_, error-code>>>;

wasi:clocks

The wasi:clocks changes are, deliberately, mostly renames. Flagging them because the churn shows up in downstream suites.

WASI#79 (Avoid nonstandard use of names for types) moved the package onto conventional names: wall-clock became system-clock, and datetime became instant. The motivation was consistency with how the rest of the ecosystem talks about clocks. "Wall clock" and "datetime" were WASI-isms that didn't match POSIX, Rust's std::time, or most other systems. wasi:filesystem timestamps followed, for the same reason.

A small types.wit was added to share the duration = u64 alias. monotonic-clock also dropped its pollable-returning subscribe-instant and subscribe-duration calls; callers now await a host-provided timer future, the same pattern used everywhere else.

Downstream impact is mostly mechanical find-and-replace. See
WebAssembly/wasi-testsuite@f13976f for a representative update across the test suite.

v0.2.12

Choose a tag to compare

@ricochet ricochet released this 02 Jun 14:07

What's Changed

  • Add specification for WASI v0.2.11 by @github-actions[bot] in #908
  • chore(deps): bump the github-actions group across 1 directory with 7 updates by @dependabot[bot] in #915
  • stabilize next by @ricochet in #923
  • remove CLI: Exit With Code from Phase 2 by @dicej in #913
  • Release WASI v0.2.12 by @github-actions[bot] in #924

New Contributors

Full Changelog: v0.2.11...v0.2.12

v0.2.11

Choose a tag to compare

@ricochet ricochet released this 07 Apr 13:37
ed73919

What's Changed

  • Add specification for WASI v0.2.10 by @github-actions[bot] in #879
  • [filesystem] Add note prioritizing compatibility over portability by @wingo in #847
  • chore: bump wkg 0.15 by @ricochet in #881
  • Update links in wasi-sockets documentation to point to WASI by @wingo in #883
  • Specify unlink-file-at in terms of POSIX. by @wingo in #852
  • sockets: Update documentation by @badeend in #884
  • Release WASI v0.2.11 by @github-actions[bot] in #907

New Contributors

Full Changelog: v0.2.10...v0.2.11

v0.3.0-rc-2026-03-15

v0.3.0-rc-2026-03-15 Pre-release
Pre-release

Choose a tag to compare

@ricochet ricochet released this 15 Mar 17:48
50b674e

What's Changed

  • Update links in wasi-sockets documentation to point to WASI by @wingo in #883
  • Specify unlink-file-at in terms of POSIX. by @wingo in #852
  • sockets: Update documentation by @badeend in #884
  • chore(deps): bump the github-actions group with 4 updates by @dependabot[bot] in #893
  • sockets: Add error code for EPIPE (and ECONNABORTED on Windows) by @badeend in #887
  • wasi:random: Allow get(-insecure)-random-bytes to return fewer bytes than requested by @badeend in #901
  • feat(http): size-exceeded error variant by @ricochet in #891
  • wasi:sockets: Add error-code other by @badeend in #902
  • feat(filesystem):Add error-code other by @ricochet in #894
  • fix(wasip3): filesystem unknown to other by @ricochet in #903
  • Release WASI v0.3.0-rc-2026-03-15 by @github-actions[bot] in #904

Full Changelog: v0.3.0-rc-2026-02-09...v0.3.0-rc-2026-03-15

v0.3.0-rc-2026-02-09

v0.3.0-rc-2026-02-09 Pre-release
Pre-release

Choose a tag to compare

@ricochet ricochet released this 09 Feb 19:40
b20b21c

What's Changed

  • Async write prevents Rust bindings and component composition by @badeend in #870
  • Remove double async'ness from read-directory. by @badeend in #869
  • Clarify the implicit bind behavior observed on Windows. by @badeend in #868
  • [filesystem] Add note prioritizing compatibility over portability by @wingo in #847
  • chore: bump wkg 0.15 by @ricochet in #881

New Contributors

Full Changelog: v0.3.0-rc-2026-01-06...v0.3.0-rc-2026-02-09

v0.2.10

Choose a tag to compare

@ricochet ricochet released this 03 Feb 15:25
35ff7b6

What's Changed

  • fix: set wkg publish wit dir by @ricochet in #842
  • fix: publish in dep order by @ricochet in #843
  • Add specification for WASI v0.2.9 by @github-actions[bot] in #844
  • Advancing WASI OTel from phase 0 to phase 1 by @asteurer in #845
  • ci: add labeler by @ricochet in #846
  • List new WASI co-champions in Proposals.md by @yoshuawuyts in #853
  • Migrate WASI 0.1 docs from legacy/ dir to wasi-0.1 branch by @yoshuawuyts in #855
  • Bump the github-actions group with 5 updates by @dependabot[bot] in #861
  • ci: handle incorrect inputs for rc date by @ricochet in #864
  • Release WASI v0.3.0-rc-2026-01-06 by @github-actions[bot] in #866
  • lint since by @ricochet in #867
  • ci: upload wit tar for releases by @ricochet in #877
  • Bump the github-actions group with 5 updates by @dependabot[bot] in #876
  • Release WASI v0.2.10 by @github-actions[bot] in #878

Full Changelog: v0.2.9...v0.2.10

v0.3.0-rc-2026-01-06

v0.3.0-rc-2026-01-06 Pre-release
Pre-release

Choose a tag to compare

@ricochet ricochet released this 06 Jan 17:13
Immutable release. Only release title and notes can be modified.
d9e97fe

What's Changed

  • fix: set wkg publish wit dir by @ricochet in #842
  • fix: publish in dep order by @ricochet in #843
  • Add specification for WASI v0.2.9 by @github-actions[bot] in #844
  • Advancing WASI OTel from phase 0 to phase 1 by @asteurer in #845
  • ci: add labeler by @ricochet in #846
  • List new WASI co-champions in Proposals.md by @yoshuawuyts in #853
  • Migrate WASI 0.1 docs from legacy/ dir to wasi-0.1 branch by @yoshuawuyts in #855
  • Bump the github-actions group with 5 updates by @dependabot[bot] in #861
  • ci: handle incorrect inputs for rc date by @ricochet in #864
  • Release WASI v0.3.0-rc-2026-01-06 by @github-actions[bot] in #866

Full Changelog: v0.2.9...v0.3.0-rc-2026-01-06

v0.2.9

Choose a tag to compare

@ricochet ricochet released this 02 Dec 14:26
Immutable release. Only release title and notes can be modified.
34c0258

What's Changed

New Contributors

Full Changelog: v0.2.8...v0.2.9

v0.2.8

Choose a tag to compare

@ricochet ricochet released this 07 Oct 15:37
b26023f

What's Changed

  • Release WASI v0.2.8 by @github-actions[bot] in #670

Full Changelog: v0.2.7...v0.2.8

v0.2.7

Choose a tag to compare

@ricochet ricochet released this 12 Aug 19:18
8a69f1e

What's Changed

  • Add caveat about support for sync flags by @zoraaver in #560
  • Release WASI v0.2.7 by @github-actions[bot] in #668

Full Changelog: v0.2.6...v0.2.7