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-switchingand expose configuration options for enabling stack switching in the embedding.
dhil removed the review request for wasmtime-core-reviewers from PR #15148.
dhil requested wasmtime-core-reviewers for a review on PR #15148.
dhil requested pchickey for a review on PR #15148.
dhil added the label wasm-proposal:stack-switching on PR #15148.
:memo: alexcrichton submitted PR review.
: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_setin Rust has no #[cfg] for example so there's no need to gate this.
:memo: dhil submitted PR review.
: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?
:memo: alexcrichton submitted PR review.
:speech_balloon: alexcrichton created PR review comment:
Given that it's a cargo feature on the
wasmtimecrate 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
#ifdefin headers should match the#[cfg]in the Rust source itself.
github-actions[bot] added the label wasmtime:c-api on PR #15148.
dhil updated PR #15148.
:thumbs_up: alexcrichton submitted PR review.
alexcrichton added PR #15148 [stack-switching] C API to the merge queue.
:check: alexcrichton merged PR #15148.
alexcrichton removed PR #15148 [stack-switching] C API from the merge queue.
Last updated: Nov 19 2026 at 20:05 UTC