alexcrichton opened PR #11686 from alexcrichton:wasmtime-wast-new-store-per-component to bytecodealliance:main:
This commit refactors the
wasmtime-wastcrate to place each component in its own store. This is in contrast to core wasm testing where all instances get placed in the same store. The reason for this is that components, in particular async state, is only fully defined so long as a trap doesn't happen and once a trap happens it's expected the entire store is torn down. This removes the need for the store to keep track of exactly which instance all async tasks are associated with to ensure that once any of them trap only the precise set of tasks necessary are torn down. Instead Wasmtime can rely on embedders throwing awayStore<T>entirely.The refactoring here provides a hook in
WastContextto configure the store but otherwise a new store is manufactured for all component instances. Core wasm is unaffected. Tests are also unaffected as same-store behavior isn't actually required by any tests.<!--
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
-->
alexcrichton requested fitzgen for a review on PR #11686.
alexcrichton requested wasmtime-fuzz-reviewers for a review on PR #11686.
alexcrichton requested wasmtime-core-reviewers for a review on PR #11686.
fitzgen submitted PR review.
fitzgen merged PR #11686.
Last updated: Dec 06 2025 at 06:05 UTC