Stream: git-wasmtime

Topic: wasmtime / PR #14386 Scope the "power" of epoch/call hooks


view this post on Zulip Wasmtime GitHub notifications bot (Sep 23 2026 at 15:00):

alexcrichton opened PR #14386 from alexcrichton:scope-hook-state to bytecodealliance:main:

This commit changes Wasmtime's API to no longer take a StoreContextMut in 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 a gc() during a call hook doesn't handle ValRaws on the stack and a throw() during an epoch doesn't correctly handle the exception being thrown.

The change here is to replace StoreContextMut with a new StoreHookState structure. This structure implements AsContext and allows mutable access to the T in Store<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:

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

Please review the Bytecode Alliance's AI tool usage policy at
https://github.com/bytecodealliance/governance/blob/main/AI_TOOL_POLICY.md

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 (Sep 23 2026 at 15:00):

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

view this post on Zulip Wasmtime GitHub notifications bot (Sep 23 2026 at 15:00):

alexcrichton requested pchickey for a review on PR #14386.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 23 2026 at 16:34):

alexcrichton updated PR #14386.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 23 2026 at 16:51):

:thumbs_up: pchickey submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 23 2026 at 17:12):

alexcrichton updated PR #14386.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 23 2026 at 17:12):

alexcrichton has enabled auto merge for PR #14386.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 23 2026 at 17:29):

alexcrichton added PR #14386 Scope the "power" of epoch/call hooks to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 23 2026 at 17:55):

:check: alexcrichton merged PR #14386.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 23 2026 at 17:55):

alexcrichton removed PR #14386 Scope the "power" of epoch/call hooks from the merge queue.


Last updated: Oct 11 2026 at 04:10 UTC