CABI: refactor/simplify stream/future logic; fix delivery of DROPPED/CANCELLED - #719
Merged
Merged
Conversation
lukewagner
force-pushed
the
more-simplify
branch
from
September 13, 2026 18:14
205ac74 to
35e9769
Compare
lukewagner
force-pushed
the
more-simplify
branch
from
September 14, 2026 20:45
35e9769 to
b5d1c47
Compare
DROPPEDDROPPED/CANCELLED
Member
Author
|
More testing showed another related case of spec/wasmtime divergence where I think Wasmtime is right: after a |
dicej
added a commit
to dicej/wasmtime
that referenced
this pull request
Sep 15, 2026
WebAssembly/component-model#719 adds some new tests that assert certain behavior when the guest has been notified that the other end of a stream or future has been dropped (e.g. trapping if the guest tried to keep using the handle), and this commit updates Wasmtime to match. As of this writing, that PR has not yet been merged, so I'm not updating the `tests/component-model` submodule yet, but I've verified that the tests on the PR branch pass locally.
dicej
approved these changes
Sep 15, 2026
dicej
left a comment
Collaborator
There was a problem hiding this comment.
LGTM
bytecodealliance/wasmtime#14342 addresses the failing tests for Wasmtime.
pull Bot
pushed a commit
to langyo/wasmtime
that referenced
this pull request
Sep 15, 2026
WebAssembly/component-model#719 adds some new tests that assert certain behavior when the guest has been notified that the other end of a stream or future has been dropped (e.g. trapping if the guest tried to keep using the handle), and this commit updates Wasmtime to match. As of this writing, that PR has not yet been merged, so I'm not updating the `tests/component-model` submodule yet, but I've verified that the tests on the PR branch pass locally.
lukewagner
force-pushed
the
more-simplify
branch
from
September 15, 2026 21:27
148bdd7 to
b812be5
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.
This PR factors out the first commit of #717, since it's pretty nice on its own and can be merged earlier since it's just behavior-preserving refactoring, except for fixing a spec bug (where
DROPPEDwasn't being delivered promptly even though the other side had dropped) that now matches wasmtime.The PR is able to remove 125 lines (!) from
definitions.pyby merging future+stream and read+write definitions that were formerly separate. The key simplification was removing the intermediatesharedobject that both the readable/writable ends point to. Previously, thissharedobject seemed necessary to serve as the host/guest abstract interface, but as this PR shows, a better alternative is to instead say that the host owns and uses a readable/writable end directly (as if it was a component with its ownhandlestable), and thus the two ends can just point to each other directly with no intermediate object.