Skip to content

feat(v8)!: synchronize Rust crates with major updates#1117

Draft
Renegade334 wants to merge 1 commit into
nodejs:mainfrom
Renegade334:v8-crates
Draft

feat(v8)!: synchronize Rust crates with major updates#1117
Renegade334 wants to merge 1 commit into
nodejs:mainfrom
Renegade334:v8-crates

Conversation

@Renegade334

@Renegade334 Renegade334 commented Jul 14, 2026

Copy link
Copy Markdown
Member

An implementation of nodejs/node#64191 (comment). Depends on #1116 and nodejs/node#64482.

Broadly speaking, the process is as follows:

  1. Checkout the third_party/rust repository alongside the other DEPS. Note that this never enters the Node.js git tree, as it's deliberately not exempt from .gitignore, but fetching it here can make use of the existing DEPS machinery.
  2. Use cargo tree to walk the temporal_capi dependency tree in third_party/rust/chromium_crates_io, and populate a list of transitive dependencies, so that we only vendor what we need for Temporal.
  3. Build a new Cargo.toml manifest, copying any custom configs for crates that appear in the temporal_capi dependency tree.
  4. Copy the vendored dependencies from third_party/rust/chromium_crates_io to deps/crates.
    • We don't use cargo vendor here, because Chromium uses its own gnrt toolchain to vendor its crate dependencies, which also applies any floating patches in third_party/rust/chromium_crates_io/patches. Using cargo vendor would fetch fresh copies from crates.io, and miss these patches.
    • The slight caveat is that, unlike cargo vendor, gnrt always adds some variation of the version string when naming the vendored crate directories. It doesn't matter for the rust build, since cargo doesn't care about the directory names, but it does mean that we need to update the temporal_capi include path in crates.gyp whenver we update the crates.
  5. Regenerate the lockfile.
  6. Update a standalone variable in crates.gyp containing the temporal_capi crate directory name, so that the V8 C++ build has the correct include path for the temporal_rs headers.
  7. 🏁

Example result: nodejs/node@f3bf260

Like Chromium, this approach doesn't add a rust-version to the crates manifest; Cargo will read this from the dependencies' manifests anyway.

@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.06%. Comparing base (0ead0a1) to head (a743669).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1117      +/-   ##
==========================================
+ Coverage   62.37%   63.06%   +0.68%     
==========================================
  Files          48       50       +2     
  Lines        7892     8288     +396     
==========================================
+ Hits         4923     5227     +304     
- Misses       2969     3061      +92     

☔ 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.

This is a breaking change, as Cargo is now a mandatory requirement for
running a major update.
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.

1 participant