arjunr2 opened PR #12576 from arjunr2:main to bytecodealliance:main:
Added checksum computations for components
arjunr2 requested wasmtime-core-reviewers for a review on PR #12576.
arjunr2 requested wasmtime-default-reviewers for a review on PR #12576.
arjunr2 requested pchickey for a review on PR #12576.
cfallin submitted PR review.
cfallin created PR review comment:
We'll need to make this a workspace dep instead (see other lines around this one, and put the actual dep in the root
Cargo.toml'sworkspace.dependenciessection), and one of the core maintainers will need to vet the crate and any transitive deps.
cfallin created PR review comment:
Should we make this optional, only if recording is enabled? For large module compilation, one single additional pass of a digest algorithm over machine code bytes is probably not much extra overhead; but it may still be measurable in some cases and I wouldn't want to pessimize unrelated runs.
github-actions[bot] added the label wasmtime:api on PR #12576.
arjunr2 updated PR #12576.
arjunr2 requested wasmtime-wasi-reviewers for a review on PR #12576.
arjunr2 submitted PR review.
arjunr2 created PR review comment:
Do you mean optional based on feature flags or optional based on the config option?
cfallin submitted PR review.
cfallin created PR review comment:
Probably based on a dynamic check of the configuration -- eventually we'll probably have the RR feature included by default (if all goes well), but we don't necessarily want to compute a digest of everything we build.
arjunr2 submitted PR review.
arjunr2 created PR review comment:
I guess regardless that'll require a rr feature flags on environ then. Would the checksum just be 0 when recording is disabled?
cfallin submitted PR review.
cfallin created PR review comment:
Yes, I think so.
arjunr2 updated PR #12576.
arjunr2 commented on PR #12576:
I've made the checksum computation optional. Since the compilation flows only have access to
Tunables, there's a new field there to signal recording now.
cfallin submitted PR review:
LGTM modulo one nit below; with that fixed, and with CI green, we can merge. Thanks!
cfallin created PR review comment:
Small style nit but we prefer cfg directives at coarser granularity if possible, to avoid confusing mistakes and hard-to-read code -- would you mind putting the cfg on two variants of
from_binary?
arjunr2 updated PR #12576.
cfallin submitted PR review:
LGTM, thanks!
cfallin added PR #12576 RR #2: Sha256 checksum for components to the merge queue.
cfallin merged PR #12576.
cfallin removed PR #12576 RR #2: Sha256 checksum for components from the merge queue.
Last updated: Feb 24 2026 at 04:36 UTC