Skip to content

Align the Rust crate graph with V8's Chromium crate versions - #7926

Merged
npaun merged 1 commit into
npaun/v8-rust-in-workerdfrom
npaun/v8-rust-chromium-crate-versions
Oct 28, 2026
Merged

npaun merged 1 commit into
npaun/v8-rust-in-workerdfrom
npaun/v8-rust-chromium-crate-versions

Conversation

@npaun

@npaun npaun commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Stacked on #7925 (npaun/v8-rust-in-workerd), which builds V8's Temporal against temporal_capi from crates.io using workerd's own rules_rust toolchain.

That base branch resolves Temporal's crates inside workerd's existing crate graph, where Cargo unification drifts several of them from the versions Chromium builds V8 15.7 with. This makes every runtime crate in temporal_capi's tree resolve to Chromium's exact version (third_party/rust/chromium_crates_io at the revision in V8's DEPS), within the one crates_vendor graph: we follow V8's versions rather than fighting them.

It pins icu_calendar = "=2.2.1". Cargo allows only one semver-compatible version of each ICU4X crate, so url/idna's icu_normalizer/icu_properties/icu_collections move to the 2.2 line too, and a few other crates in the tree (icu_locale_core, icu_provider, tinystr, yoke, zerovec, zerovec-derive) go back to Chromium's versions in the lockfile. The full table is in the commit message.

Unicode data goes back one version. Main has since moved ICU4X to 2.4, whose data is generated from Unicode 18 (CLDR 49); 2.2's is Unicode 17. So idna's UTS 46 mapping and the Unicode properties regress for the 13,007 code points Unicode 18 newly assigns (unassigned again), and 3 Balinese marks change Bidi_Class. 2.2 and 2.3 give identical results for every code point. This comes back automatically once Chromium moves to a newer ICU4X.

The branch was rebased onto current main (merges cleanly), and deps/rust/cargo-bazel-lock.json, which main now commits, was regenerated with CARGO_BAZEL_REPIN=1.

Verified after the rebase: cargo metadata --locked passes; the crate versions in temporal_capi's tree match Chromium's chromium_crates_io/Cargo.lock. Before the rebase: workerd built, temporal-hidden-test passed 5/5, and 25/25 URL/IDNA-adjacent tests passed (url api tests, //src/wpt:url, htmlrewriter, kj-hyper, transpiler, python-parser, workerd-server). Those haven't been re-run on the rebased branch; CI will.

Tradeoff: V8 updates now dictate the ICU4X line for the whole Rust graph, and crates held only by the lockfile can drift back on a routine cargo update. #8058 (draft, stacked on this) adds python3 ci/v8_update.py rust-crates to keep them aligned with V8's pinned Chromium revision.

🤖 Generated with Claude Code

@npaun
npaun added this pull request to stack #7927 October 23, 2026 17:56
@npaun
npaun requested a review from logan-gatlin October 23, 2026 18:08
@npaun
npaun force-pushed the npaun/v8-rust-chromium-crate-versions branch from 991333d to 87f3373 Compare October 23, 2026 18:09
@logan-gatlin

Copy link
Copy Markdown
Contributor

It would be nice to automate this so that when v8's crate pins change ours do as well. I did something kinda similar in the rust ICU port

@logan-gatlin

Copy link
Copy Markdown
Contributor

But as I said in the other PR, I think this is the right approach for now

@npaun
npaun marked this pull request as ready for review October 28, 2026 00:00
@npaun
npaun requested review from a team as code owners October 28, 2026 00:00
@ask-bonk

ask-bonk Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Since last review: 0 resolved, 0 still open, 0 new.
LGTM!

Not re-run: design-simplicity (no author changes in their files since the last review)


Reviewed commit: 767610e8 · github run

@clanky-the-clanker

clanky-the-clanker Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

💬 Approved with comments — The dependency pin and both lockfiles are consistent. One INFO remains: the Cargo.toml comment overstates how much of the ICU4X graph is on 2.2.

Findings: 1 info

The decision is advisory: this comment never approves, blocks or requests changes on the pull request.


📋 Code Quality: 💬 1 info

The lockfiles are consistent. The comment on the pin still overstates how much of ICU4X is on 2.2.

Recommendation: 💬 Optional Nits

  • [INFO] The pin comment says ICU4X stays on 2.2 "with the rest of the graph", but icu_locale_core 2.3.0 and icu_provider 2.3.1 are still on 2.3. Narrow the wording, or check these two crates against Chromium's pins. (deps/rust/Cargo.toml:99)
View full review
  • Comment accuracy (deps/rust/Cargo.toml:98-99): The comment says the pin keeps ICU4X data "on the 2.2 line with the rest of the graph". Two ICU4X crates are still on 2.3, in both Cargo.lock and cargo-bazel-lock.json:

    • icu_locale_core 2.3.0 (Cargo.lock:1159-1160)
    • icu_provider 2.3.1 (Cargo.lock:1219-1220)

    Either narrow the comment to the ICU4X component and data crates, or check these two crates against Chromium's third_party/rust and pin them if the "exact Chromium versions" claim should hold. The build is not affected.

  • Lockfile consistency: cargo-bazel-lock.json matches Cargo.lock. The versions and checksums agree for:

    • icu_calendar 2.2.1
    • icu_locale 2.2.0, which is new; icu_locale_fallback is removed
    • yoke, zerovec and tinystr
    • smallvec 1.16.2 and unicode-ident 1.0.26

    The direct icu_calendar dependency appears in both files.


✅ All other checks passed

🔒 Security: ✅ LGTM

No security issues. All registry sources are crates.io, and there are no new git or path dependencies. The checksums agree between the two lockfiles. The version downgrades were not checked against crates.io or an advisory database, because this environment has no network access.


📖 AGENTS.md: ✅ LGTM

No AGENTS.md updates are needed.


⚡ Performance: ✅ LGTM

No performance concerns.


📝 Documentation: ✅ LGTM

The new comment describes the current state and says why the pin exists. Its one accuracy issue is covered in the code quality section.


Reviewed commit: 767610e8 — same changes as 1d5135de, so this is that commit's review (no new review was run; line numbers are as of 1d5135de)

@npaun
npaun force-pushed the npaun/v8-rust-chromium-crate-versions branch from 87f3373 to 55e97d4 Compare October 28, 2026 00:55
@npaun
npaun force-pushed the npaun/v8-rust-chromium-crate-versions branch from 55e97d4 to 1d5135d Compare October 28, 2026 01:30
@npaun
npaun enabled stacked auto-merge (rebase) October 28, 2026 01:32
@codecov-commenter

codecov-commenter commented Oct 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (npaun/v8-rust-in-workerd@08d0f09). Learn more about missing BASE report.

Additional details and impacted files
@@                     Coverage Diff                     @@
##             npaun/v8-rust-in-workerd    #7926   +/-   ##
===========================================================
  Coverage                            ?   69.45%           
===========================================================
  Files                               ?      696           
  Lines                               ?   181370           
  Branches                            ?    29176           
===========================================================
  Hits                                ?   125966           
  Misses                              ?    38359           
  Partials                            ?    17045           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

V8's Temporal is built and tested in Chromium against
third_party/rust/chromium_crates_io. Pin icu_calendar to Chromium's
=2.2.1 so that every crate in temporal_capi's runtime tree resolves
to Chromium's exact version within the one crates_vendor graph.

icu_calendar 2.2.1 requires the ICU4X 2.2 line, and Cargo allows
only one semver-compatible icu_collections, so url's idna_adapter
moves to icu_normalizer/icu_properties 2.2 as well. 2.2's data is
generated from Unicode 17 and 2.4's from Unicode 18 (CLDR 49), so
idna's UTS 46 mapping and the properties go back one Unicode
version: of every code point, 13,007 that Unicode 18 newly assigns
are unassigned again, and 3 Balinese marks change Bidi_Class.
2.2 and 2.3 give identical results for every code point.

Moved crates:
  icu_calendar               2.3.0  -> 2.2.1
  icu_calendar_data          2.3.0  -> 2.2.0
  icu_collections            2.4.0  -> 2.2.0
  icu_locale_core            2.4.0  -> 2.3.0
  icu_normalizer             2.4.0  -> 2.2.0
  icu_normalizer_data        2.4.0  -> 2.2.0
  icu_properties             2.4.0  -> 2.2.0
  icu_properties_data        2.4.0  -> 2.2.0
  icu_provider               2.4.0  -> 2.3.1
  smallvec                   1.16.4 -> 1.16.2
  tinystr                    0.8.5  -> 0.8.4
  unicode-ident              1.0.27 -> 1.0.26
  yoke                       0.8.4  -> 0.8.3
  zerovec                    0.11.9 -> 0.11.8
  zerovec-derive             0.11.7 -> 0.11.6
  icu_locale, icu_locale_data 2.2.0 added
  icu_locale_fallback, icu_locale_fallback_data 2.3.0 removed

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@npaun
npaun force-pushed the npaun/v8-rust-chromium-crate-versions branch from 1d5135d to 767610e Compare October 28, 2026 03:52
@npaun
npaun merged commit 9aec8d2 into main Oct 28, 2026
25 checks passed
@npaun
npaun deleted the npaun/v8-rust-chromium-crate-versions branch October 28, 2026 04:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants