feat: add {stream,future}.forward canon builtins - #2614
Draft
rvolosatovs wants to merge 2 commits into
Draft
Conversation
rvolosatovs
force-pushed
the
feat/stream-forward
branch
from
August 20, 2026 16:23
dcc747d to
863fb55
Compare
stream.forward canon builtinstream.splice canon builtin
rvolosatovs
force-pushed
the
feat/stream-forward
branch
from
August 21, 2026 17:25
61a71e1 to
1db203a
Compare
stream.splice canon builtinstream.{splice,forward} canon builtins
rvolosatovs
force-pushed
the
feat/stream-forward
branch
2 times, most recently
from
August 24, 2026 15:19
8ff9873 to
6ce0ba5
Compare
stream.{splice,forward} canon builtins{stream,future}.forward canon builtins
rvolosatovs
force-pushed
the
feat/stream-forward
branch
from
August 24, 2026 16:15
6ce0ba5 to
d81e1b4
Compare
Implement parsing, validation, encoding, and printing support for the ⏩-gated `stream.forward` built-in proposed in WebAssembly/component-model#658: (canon stream.forward $streamT (core func $f)) where `$f` has type `(func (param i32 i32))`, taking a readable stream end and a writable stream end. `stream.forward` transfers both ends out of the calling instance and returns immediately with no result, so it takes neither an `n` parameter nor an `async` immediate. It also takes no `canonopt`s, since no elements pass through the caller's linear memory. The binary encoding uses opcode 0x2f as assigned in the proposed specification change, and validation gates the built-in behind the component model async and "more async builtins" features. Assisted-by: claude:claude-fable-5 Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
Implement parsing, validation, encoding, and printing support for the ⏩-gated `future.forward` built-in proposed in WebAssembly/component-model#658: (canon future.forward $futureT (core func $f)) where `$f` has type `(func (param i32 i32))`, taking a readable future end and a writable future end. Exactly like its `stream.forward` counterpart, `future.forward` transfers both ends out of the calling instance and returns immediately with no result, so it takes neither an `async` immediate nor any `canonopt`s, since the value does not pass through the caller's linear memory. The binary encoding uses opcode 0x2e as assigned in the proposed specification change, and validation gates the built-in behind the component model async and "more async builtins" features. Assisted-by: claude:claude-fable-5
rvolosatovs
force-pushed
the
feat/stream-forward
branch
from
August 25, 2026 16:57
d81e1b4 to
a7a7254
Compare
rvolosatovs
added a commit
to rvolosatovs/wasmtime
that referenced
this pull request
Aug 25, 2026
Pick up `wasmparser`/`wast`/`wasm-encoder` support for the `stream.forward` and `future.forward` canonical built-ins from bytecodealliance/wasm-tools#2614 until that lands upstream.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add support for
{stream,future}.forwardbuiltins as specified in WebAssembly/component-model#709