alexcrichton opened PR #14612 from alexcrichton:uphold-more-contracts to bytecodealliance:main:
This commit refines the implementation of host-side polling of stream producers and consumers to more strictly check the requirements that trait implementations must adhere to in order to avoid giving the wrong results to guests. Notably if a stream returns complete without actually consuming anything, if a producer completes without actually producing anything, or if a producer both cancels and produces these are all traps now.
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease review the Bytecode Alliance's AI tool usage policy at
https://github.com/bytecodealliance/governance/blob/main/AI_TOOL_POLICY.mdPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton requested pchickey for a review on PR #14612.
alexcrichton requested wasmtime-core-reviewers for a review on PR #14612.
:thumbs_up: pchickey submitted PR review.
alexcrichton added PR #14612 Uphold more API constraints of stream producers/consumers to the merge queue.
:check: alexcrichton merged PR #14612.
alexcrichton removed PR #14612 Uphold more API constraints of stream producers/consumers from the merge queue.
Last updated: Oct 11 2026 at 04:10 UTC