dicej opened PR #11981 from dicej:partial-read-write-fixes to bytecodealliance:main:
This fixes and adds test coverage for a couple of bugs involving component model streams:
delay returning
Droppeduntil producer buffer drainedIf the
StreamProducercallsDestination::set_buffer, we need to make sure all the items in that buffer have been delivered to the receiver (or the receiver closes its end) before telling it the write end has been dropped.reset read/write state back to
Openon event deliveryIf one end of a stream does a partial read or write, we leave the other end in a
GuestReadystate, allowing further reads or writes to proceed until the buffer has been drained or filled, respectively. However, once we've delivered the event regarding the partial operation, we need to set the state back toOpen, since we'll have released the buffer back to the guest at that point.<!--
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 ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
dicej requested fitzgen for a review on PR #11981.
dicej requested wasmtime-core-reviewers for a review on PR #11981.
dicej requested alexcrichton for a review on PR #11981.
alexcrichton submitted PR review.
dicej merged PR #11981.
Last updated: Dec 06 2025 at 07:03 UTC