Stream: git-wasmtime

Topic: wasmtime / PR #11250 Require `Accessor` on all future/str...


view this post on Zulip Wasmtime GitHub notifications bot (Jul 15 2025 at 22:02):

alexcrichton opened PR #11250 from alexcrichton:more-accessor-apis to bytecodealliance:main:

This is a follow-up to #11238 which adds &Accessor arguments to all functions for futures and streams. Like #11238 this is done to make future refactorings easier for the internal implementation but the internal implementations are not updated at this time. Many functions, for example, do not use the argument at all just yet. The purpose of this is to ensure host usage of these functions always provides a store context.

This change required large refactorings of the upcoming wasmtime-wasi-http implementation in the wasip3-prototyping repository. That's all been sorted out now though so the changes are being pulled back here into the Wasmtime repository as well.

This commit additionally changes the watch_* functions on the various stream/future types to take &mut self instead of self-by-value. This is mostly a stylistic change and is more API-driven than anything else. Functionally this behaves the same as before where, while watching, the stream/future cannot be read/written to otherwise.

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Jul 15 2025 at 22:02):

alexcrichton requested fitzgen for a review on PR #11250.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 15 2025 at 22:02):

alexcrichton requested wasmtime-core-reviewers for a review on PR #11250.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 15 2025 at 22:02):

alexcrichton edited PR #11250:

This is a follow-up to #11238 which adds &Accessor arguments to all functions for futures and streams. Like #11238 this is done to make future refactorings easier for the internal implementation but the internal implementations are not updated at this time. Many functions, for example, do not use the argument at all just yet. The purpose of this is to ensure host usage of these functions always provides a store context.

This change required large refactorings of the upcoming wasmtime-wasi-http implementation in the wasip3-prototyping repository. That's all been sorted out now though so the changes are being pulled back here into the Wasmtime repository as well.

This commit additionally changes the watch_* functions on the various stream/future types to take &mut self instead of self-by-value. This is mostly a stylistic change and is more API-driven than anything else. Functionally this behaves the same as before where, while watching, the stream/future cannot be read/written to otherwise.

cc https://github.com/bytecodealliance/wasmtime/issues/11224

view this post on Zulip Wasmtime GitHub notifications bot (Jul 15 2025 at 22:02):

alexcrichton requested dicej for a review on PR #11250.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 15 2025 at 22:03):

alexcrichton commented on PR #11250:

Ah I also added a new AsAccessor helper trait here to assist with functions-taking-this-as-a-bound to make those a bit easier to write (in theory at least)

view this post on Zulip Wasmtime GitHub notifications bot (Jul 16 2025 at 10:12):

rvolosatovs submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 16 2025 at 13:58):

dicej submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 16 2025 at 13:58):

dicej created PR review comment:

    /// Panics if the store that the [`Accessor`] is derived from does not own

view this post on Zulip Wasmtime GitHub notifications bot (Jul 16 2025 at 13:58):

dicej created PR review comment:

    /// Panics if the store that the [`Accessor`] is derived from does not own

... just to make it consistent with the corresponding doc comments below

view this post on Zulip Wasmtime GitHub notifications bot (Jul 16 2025 at 13:58):

dicej created PR review comment:

    /// Panics if the store that the [`Accessor`] is derived from does not own

view this post on Zulip Wasmtime GitHub notifications bot (Jul 16 2025 at 13:58):

dicej created PR review comment:

    /// Panics if the store that the [`Accessor`] is derived from does not own

view this post on Zulip Wasmtime GitHub notifications bot (Jul 16 2025 at 14:27):

alexcrichton updated PR #11250.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 16 2025 at 14:27):

alexcrichton has enabled auto merge for PR #11250.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 16 2025 at 15:05):

alexcrichton merged PR #11250.


Last updated: Dec 06 2025 at 06:05 UTC