dicej requested alexcrichton for a review on PR #11612.
dicej requested rvolosatovs for a review on PR #11612.
dicej opened PR #11612 from dicej:unconditional-destination-as-direct to bytecodealliance:main:
In order to reduce code duplication (and code paths to test) in
wasmtime-wasiand custom host embeddings, I've madeDestination::as_direct(formerly known asas_direct_destination) work for host readers as well as guest ones. In the process, I noticed and fixed a couple of related issues:
- I had forgotten to implement or test host reader support in
DirectSource:facepalm:- The code to support host-to-host pipes failed to account for partial reads
I've also simplified the
StreamConsumerandStreamProducerAPIs slightly by having them take theirSourceandDestinationparameters by value rather than by reference, respectively.Note that, per https://github.com/WebAssembly/component-model/issues/561, I've tweaked the documentation for
StreamProducerto indicate that implementations might reasonably opt to "pretend" they're ready without buffering any items when handling zero-length reads given that buffering has its own hazards. Likewise, I've updated thewasi-filesystemandwasi-cliimplementations to "pretend" instead of buffering.<!--
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 wasmtime-wasi-reviewers for a review on PR #11612.
dicej requested wasmtime-core-reviewers for a review on PR #11612.
alexcrichton submitted PR review.
alexcrichton merged PR #11612.
Last updated: Dec 06 2025 at 06:05 UTC