alexcrichton opened PR #13560 from alexcrichton:no-gate-features-in-cranelift to bytecodealliance:main:
This commit removes the suite of Cargo features corresponding to wasm proposals from the
wasmtime-internal-craneliftcrate. These features are now instead unconditionally enabled for the crate. This is similarly handled now inwasmtime-internal-winch.The motivation for this commit is that all
#[cfg]comes at a cost in terms of CI, reading, writing, etc. The primary benefits of#[cfg]are reducing runtime dependencies and reducing the compiled footprint of an application. Withwasmtime-internal-craneliftneither of these benefits are realized with the current features because runtime dependencies are the same with/without the features and Cranelift dominates the compiled code size. Given the very-minor benefits, if any, that are being earned it doesn't seem worth the cost.This means that Cranelift translation unconditionally has support for all wasm proposals, regardless of how Wasmtime is configured. Note though that Wasmtime retains all these features just as before because they do indeed gate actual runtime dependencies or significant chunks of binary size.
<!--
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 requested cfallin for a review on PR #13560.
alexcrichton requested wasmtime-compiler-reviewers for a review on PR #13560.
alexcrichton requested wasmtime-core-reviewers for a review on PR #13560.
alexcrichton updated PR #13560.
:memo: bjorn3 submitted PR review.
:speech_balloon: bjorn3 created PR review comment:
Before this was the serde integration of cranelift-codegen already unconditionally enabled? If not, how much does that hurt compile time?
:thumbs_up: cfallin submitted PR review:
This is a great cleanup in general -- thanks for doing this!
I guess one of the other reasons for us to feature-flag in general is to gate in-development or unstable features. Probably though that's more appropriate for the runtime (where a build-time feature could compile out some runtime-reachable path) and we can rely on dynamic
Configfeature flags to guard use of unstable features during compilation. So overall I agree there doesn't seem to be a good reason to keep this.
alexcrichton updated PR #13560.
:memo: alexcrichton submitted PR review.
:speech_balloon: alexcrichton created PR review comment:
I'm not sure, I haven't measured.
alexcrichton has enabled auto merge for PR #13560.
alexcrichton added PR #13560 Remove Cargo features from wasmtime-internal-cranelift to the merge queue
github-actions[bot] added the label wasmtime:api on PR #13560.
github-actions[bot] added the label winch on PR #13560.
github-actions[bot] commented on PR #13560:
Subscribe to Label Action
cc @saulecabrera
<details>
This issue or pull request has been labeled: "wasmtime:api", "winch"Thus the following users have been cc'd because of the following labels:
- saulecabrera: winch
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
:check: alexcrichton merged PR #13560.
alexcrichton removed PR #13560 Remove Cargo features from wasmtime-internal-cranelift from the merge queue
Last updated: Jul 29 2026 at 05:03 UTC