dicej requested alexcrichton for a review on PR #11796.
dicej opened PR #11796 from dicej:fix-11226 to bytecodealliance:main:
This has a few benefits:
- No need to specify an instance when creating or piping from a stream or future.
- No need to track the instance in an
Accessor.- You may now execute tasks for multiple instances in a single event loop.
The main drawback is that, if one of several instances within a single store traps, it effectively means all instances have trapped, and the store can't be used to create new instances. The way to avoid that is to use separate stores for instances which must be isolated from others.
As a result of this change, a lot of code had to move from e.g.
impl Instanceto e.g.impl StoreOpaque, so the diff is pretty huge, but the changes themselves are almost entirely non-functional.Fixes #11226
<!--
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-core-reviewers for a review on PR #11796.
dicej requested wasmtime-wasi-reviewers for a review on PR #11796.
dicej updated PR #11796.
alexcrichton submitted PR review.
alexcrichton created PR review comment:
Would it makes sense to have a
concurrent_disabled.rswhich has ZST forConcurrentStatewith no methods? That would avoid this#[cfg]for example and help encapsulate "all the conditional stuff is in this file" too
alexcrichton created PR review comment:
I'm wary of making this public to the whole crate as it generally makes it harder to maintain abstraction boundaries. Would it be possible to encapsulate whatever's needed within this file instead?
dicej updated PR #11796.
dicej updated PR #11796.
dicej updated PR #11796.
alexcrichton edited PR #11796:
This has a few benefits:
- No need to specify an instance when creating or piping from a stream or future.
- No need to track the instance in an
Accessor.- You may now execute tasks for multiple instances in a single event loop.
The main drawback is that, if one of several instances within a single store traps, it effectively means all instances have trapped, and the store can't be used to create new instances. The way to avoid that is to use separate stores for instances which must be isolated from others.
As a result of this change, a lot of code had to move from e.g.
impl Instanceto e.g.impl StoreOpaque, so the diff is pretty huge, but the changes themselves are almost entirely non-functional.Fixes #11226
Fixes #11651<!--
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 edited PR #11796:
This has a few benefits:
- No need to specify an instance when creating or piping from a stream or future.
- No need to track the instance in an
Accessor.- You may now execute tasks for multiple instances in a single event loop.
The main drawback is that, if one of several instances within a single store traps, it effectively means all instances have trapped, and the store can't be used to create new instances. The way to avoid that is to use separate stores for instances which must be isolated from others.
As a result of this change, a lot of code had to move from e.g.
impl Instanceto e.g.impl StoreOpaque, so the diff is pretty huge, but the changes themselves are almost entirely non-functional.Fixes #11226
Fixes #11249
Fixes #11651<!--
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 submitted PR review.
dicej merged PR #11796.
Last updated: Dec 06 2025 at 07:03 UTC