CfirTsabari opened PR #14305 from CfirTsabari:fix-sha2-optional to bytecodealliance:main:
The only code referencing
sha2is theuse sha2::{Digest, Sha256}
import and theWasmChecksum::from_binarycall site in
module_artifacts.rs, both of which are already behind
#[cfg(feature = "rr")]. Despite that,sha2was declared as a plain
dependency, so every consumer ofwasmtime-environcompiled and linked
it even whenrrwas disabled and the code was dead.Mark the dependency
optional = trueand adddep:sha2to therr
feature so it is only pulled in when it is actually used. No code
changes were needed; the existingcfggates already cover every
reference.<!--
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 review the Bytecode Alliance's AI tool usage policy at
https://github.com/bytecodealliance/governance/blob/main/AI_TOOL_POLICY.mdPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
CfirTsabari requested pchickey for a review on PR #14305.
CfirTsabari requested wasmtime-core-reviewers for a review on PR #14305.
:thumbs_up: pchickey submitted PR review.
pchickey added PR #14305 Make sha2 an optional dependency of wasmtime-environ to the merge queue
:check: pchickey merged PR #14305.
pchickey removed PR #14305 Make sha2 an optional dependency of wasmtime-environ from the merge queue
Last updated: Sep 20 2026 at 18:08 UTC