Stream: git-wasmtime

Topic: wasmtime / PR #15148 [stack-switching] C API


view this post on Zulip Wasmtime GitHub notifications bot (Nov 04 2026 at 18:00):

dhil opened PR #15148 from dhil:stack-switching-c-api to bytecodealliance:main:

I've implemented the support for toggling stack switching in the C API with default status OFF. I am not sure what the policy is here wrt to including this change since stack switching is still an experimental feature, although, the proposal is mature (current stage 3). It is helpful to be able to embed wasmtime with stack-switching for benchmarking applications that need host imports.

Patch notes:

Enable building the C API with feature stack-switching and expose configuration options for enabling stack switching in the embedding.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 04 2026 at 18:00):

dhil removed the review request for wasmtime-core-reviewers from PR #15148.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 04 2026 at 18:00):

dhil requested wasmtime-core-reviewers for a review on PR #15148.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 04 2026 at 18:00):

dhil requested pchickey for a review on PR #15148.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 04 2026 at 18:00):

dhil added the label wasm-proposal:stack-switching on PR #15148.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 04 2026 at 18:09):

:memo: alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 04 2026 at 18:09):

:speech_balloon: alexcrichton created PR review comment:

I realize we're a bit inconsistent on this, but I think this option would suffice being ungated entirely. The actual definition of wasmtime_config_wasm_stack_switching_set in Rust has no #[cfg] for example so there's no need to gate this.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 04 2026 at 18:29):

:memo: dhil submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 04 2026 at 18:29):

:speech_balloon: dhil created PR review comment:

Ah excellent. So I can remove the cargo feature. We still need to gate on the GC feature in the C and C++ right?

view this post on Zulip Wasmtime GitHub notifications bot (Nov 04 2026 at 18:31):

:memo: alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 04 2026 at 18:31):

:speech_balloon: alexcrichton created PR review comment:

Given that it's a cargo feature on the wasmtime crate itself I think keeping the feature infrastructure still makes sense. That way support can still be tested and reflected upon and/or customized during builds.

We can probably clean up GC-related guards at some point, but basically the #ifdef in headers should match the #[cfg] in the Rust source itself.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 04 2026 at 20:44):

github-actions[bot] added the label wasmtime:c-api on PR #15148.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 05 2026 at 08:59):

dhil updated PR #15148.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 05 2026 at 15:03):

:thumbs_up: alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 05 2026 at 15:04):

alexcrichton added PR #15148 [stack-switching] C API to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 05 2026 at 15:27):

:check: alexcrichton merged PR #15148.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 05 2026 at 15:27):

alexcrichton removed PR #15148 [stack-switching] C API from the merge queue.


Last updated: Nov 19 2026 at 20:05 UTC