alexcrichton opened PR #11687 from alexcrichton:patches-dont-break-cwasm to bytecodealliance:main:
This commit is an update to our cwasm-version-matching logic to take #11685 into account. To me it feels reasonable to expect that patch releases of Wasmtime by default do not affect the ABI of
*.cwasmartifacts and thus we should allow by default loading previous versions. This can help embedders avoid recompiles and can additionally assist in more quickly deploying security updates as recompilation is unnecessary.The concrete change in this commit is that instead of baking in
CARGO_PKG_VERSIONinto the cwasm artifact insteadCARGO_PKG_VERSION_MAJORis baked in. This means that the patch release is "forgotten" and won't be compared.This commit also updates documentation for patch releases to indicate that this should be double-checked on patch releases. Furthermore we can always update the string ourselves manually (e.g. to include a ".2" at the end or something like that) if an ABI break is actually needed. This mostly just changes the default of patch releases by default don't break ABI but we still can if we really need to for a particular issue.
<!--
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 dicej for a review on PR #11687.
alexcrichton requested wasmtime-core-reviewers for a review on PR #11687.
alexcrichton requested wasmtime-default-reviewers for a review on PR #11687.
pchickey submitted PR review.
dicej submitted PR review.
alexcrichton merged PR #11687.
Last updated: Dec 06 2025 at 06:05 UTC