Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.

update future/stream ABIs and names#203

Merged
dicej merged 1 commit into
mainfrom
dicej/future-and-stream-changes
Jun 9, 2025
Merged

update future/stream ABIs and names#203
dicej merged 1 commit into
mainfrom
dicej/future-and-stream-changes

Conversation

@dicej

@dicej dicej commented Jun 9, 2025

Copy link
Copy Markdown
Collaborator

This updates wasmtime-environ, wasmtime-cranelift, and wasmtime to to use (some of) the new ABI defined in
WebAssembly/component-model#524. It covers everything in that PR except the lifting and lowering changes to future.{read,write}, which we decided are more trouble than they're worth.

Still to do: add tests for the following items (Luke has volunteered to do this):

  • When a future is "done" (by a COMPLETED read/write or by the writable end receiving DROPPED), the only valid operation is future.drop-{readable,writable}. future.{read,write} or lifting traps.
  • Because there's no great reason for streams to be more permissive than futures in this regard, streams are also given a "done" state with the same trapping rules as futures, but the stream "done" state is only set when DROPPED is received.

This updates `wasmtime-environ`, `wasmtime-cranelift`, and `wasmtime` to to use
(some of) the new ABI defined in
WebAssembly/component-model#524.  It covers everything
in that PR _except_ the lifting and lowering changes to `future.{read,write}`,
which we decided are more trouble than they're worth.

Still to do: add tests for the following items (Luke has volunteered to do this):

> * When a `future` is "done" (by a `COMPLETED` read/write or by the writable end receiving `DROPPED`), the only valid operation is `future.drop-{readable,writable}`.  `future.{read,write}` or lifting traps.
> * Because there's no great reason for streams to be more permissive than futures in this regard, streams are also given a "done" state with the same trapping rules as futures, but the stream "done" state is only set when `DROPPED` is received.

Signed-off-by: Joel Dice <joel.dice@fermyon.com>
@dicej dicej added this pull request to the merge queue Jun 9, 2025
Merged via the queue into main with commit adb7fbe Jun 9, 2025
44 checks passed
@dicej dicej deleted the dicej/future-and-stream-changes branch June 9, 2025 20:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants