alexcrichton opened PR #14386 from alexcrichton:scope-hook-state to bytecodealliance:main:
This commit changes Wasmtime's API to no longer take a
StoreContextMutin epoch deadline and call-hook handlers. Discussion on #14048 and historical issues have shown that this is far too powerful of an operation given the preexisting hook points within the store. In addition to the issues discovered then there are yet more issues still within Wasmtime such as agc()during a call hook doesn't handleValRaws on the stack and athrow()during an epoch doesn't correctly handle the exception being thrown.The change here is to replace
StoreContextMutwith a newStoreHookStatestructure. This structure implementsAsContextand allows mutable access to theTinStore<T>, but that's it. We can add mutations over time if necessary which are safe to do, but in general this is a very limited view int o the store.Closes #14048
<!--
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 review the Bytecode Alliance's AI tool usage policy at
https://github.com/bytecodealliance/governance/blob/main/AI_TOOL_POLICY.mdPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton requested wasmtime-core-reviewers for a review on PR #14386.
alexcrichton requested pchickey for a review on PR #14386.
alexcrichton updated PR #14386.
:thumbs_up: pchickey submitted PR review.
alexcrichton updated PR #14386.
alexcrichton has enabled auto merge for PR #14386.
alexcrichton added PR #14386 Scope the "power" of epoch/call hooks to the merge queue.
:check: alexcrichton merged PR #14386.
alexcrichton removed PR #14386 Scope the "power" of epoch/call hooks from the merge queue.
Last updated: Oct 11 2026 at 04:10 UTC