feat: add stream.{splice,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
Implement parsing, validation, encoding, and printing support for the `stream.splice` built-in sketched in WebAssembly/component-model#658: (canon stream.splice $streamT async? (core func $f)) where `$f` has type `(func (param i32 i32 i32) (result i32))`, taking a readable stream end, a writable stream end, and a maximum number of elements to forward. The binary encoding uses the currently-unassigned opcode 0x2e, and validation gates the built-in behind the component model async and "more async builtins" features since it is not yet part of the Component Model specification. Assisted-by: claude:claude-fable-5 Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
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
Implement parsing, validation, encoding, and printing support for the `stream.forward` built-in specified alongside `stream.splice` 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. Unlike `stream.splice`, which borrows both ends and reports the outcome back to the caller, `stream.forward` transfers both ends out of the calling instance and returns immediately with no result, so it takes neither a `n` parameter nor an `async` immediate. Like `stream.splice` it takes no `canonopt`s, since no elements pass through the caller's linear memory. The binary encoding uses the currently-unassigned opcode 0x2f, and validation gates the built-in behind the component model async and "more async builtins" features since it is not yet part of the Component Model specification. Assisted-by: claude:claude-fable-5 Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
rvolosatovs
force-pushed
the
feat/stream-forward
branch
from
August 21, 2026 17:30
1db203a to
8ff9873
Compare
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.{splice,forward}builtins as defined in WebAssembly/component-model#658 (spec PR coming soon)