alexcrichton requested dicej for a review on PR #12142.
alexcrichton requested wasmtime-core-reviewers for a review on PR #12142.
alexcrichton opened PR #12142 from alexcrichton:start-filling-out-future-and-stream-any to bytecodealliance:main:
This commit is the first step down the road of filling out the preexisting, but empty/buggy,
FutureAnyandStreamAnytypes. These are intended to behave similarly toResourceAnywhere the embedder doesn't have static knowledge ahead of time about the type of the future/stream in use. Changes made here are:
ComponentType for {Stream,Future}Reader<T>now correctly typecheck theT.- Conversion to/from
*Anytypes now properly typechecks the payload type against the expected type.{Future,Stream}Anynow live in their own file with the matrix of conversions to the typed variants.- A
closemethod was added to*Anytypes.These types are not currently directly constructible but this will likely be relaxed in the future. Additionally the host can't actually use these values without knowing the type, which is another restriction that will be relaxed in the future (aka implemented).
cc #11161
<!--
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 submitted PR review:
Thanks for doing this!
alexcrichton updated PR #12142.
alexcrichton updated PR #12142.
alexcrichton has enabled auto merge for PR #12142.
alexcrichton merged PR #12142.
Last updated: Dec 13 2025 at 19:03 UTC