Skip to content

RR #2: Sha256 checksum for components#12576

Merged
cfallin merged 4 commits intobytecodealliance:mainfrom
arjunr2:main
Feb 13, 2026
Merged

RR #2: Sha256 checksum for components#12576
cfallin merged 4 commits intobytecodealliance:mainfrom
arjunr2:main

Conversation

@arjunr2
Copy link
Contributor

@arjunr2 arjunr2 commented Feb 11, 2026

Added checksum computations for components

@arjunr2 arjunr2 requested review from a team as code owners February 11, 2026 23:34
@arjunr2 arjunr2 requested review from pchickey and removed request for a team February 11, 2026 23:34
has_wasm_debuginfo: self.tunables.parse_wasm_debuginfo,
dwarf,
},
checksum: WasmChecksum::from_binary(wasm),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean optional based on feature flags or optional based on the config option?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess regardless that'll require a rr feature flags on environ then. Would the checksum just be 0 when recording is disabled?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think so.

@github-actions github-actions bot added the wasmtime:api Related to the API of the `wasmtime` crate itself label Feb 12, 2026
@arjunr2 arjunr2 requested a review from a team as a code owner February 12, 2026 17:18
@arjunr2
Copy link
Contributor Author

arjunr2 commented Feb 13, 2026

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.

Copy link
Member

@cfallin cfallin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM modulo one nit below; with that fixed, and with CI green, we can merge. Thanks!

Copy link
Member

@cfallin cfallin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@cfallin cfallin added this pull request to the merge queue Feb 13, 2026
Merged via the queue into bytecodealliance:main with commit b298f37 Feb 13, 2026
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wasmtime:api Related to the API of the `wasmtime` crate itself

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants