Skip to content

[build] Adopt build without vendored Rust files#6643

Merged
fhanau merged 2 commits intomainfrom
felix/030326-rules_rust-no-crate-files
Apr 23, 2026
Merged

[build] Adopt build without vendored Rust files#6643
fhanau merged 2 commits intomainfrom
felix/030326-rules_rust-no-crate-files

Conversation

@fhanau
Copy link
Copy Markdown
Contributor

@fhanau fhanau commented Apr 23, 2026

Derived from #6125, but using plain rules_rust. Note that this can safely be merged by itself without needing a change to the internal rust configuration (as CI will show).

Copy link
Copy Markdown
Contributor

@ask-bonk ask-bonk Bot left a comment

Choose a reason for hiding this comment

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

Build migration review: switching from vendored crate BUILD files to crate.from_cargo. The bulk of the PR is deletion of generated files, which is great. A few items to address.

Critical: Missing derive feature for clap will break gen-compile-cache.
Minor: Dead code and stale comments from the migration.

Comment thread deps/rust/Cargo.toml Outdated
Comment thread build/deps/rust.MODULE.bazel Outdated
Comment thread build/deps/rust.MODULE.bazel
Comment thread deps/rust/BUILD.bazel Outdated
@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk Bot commented Apr 23, 2026

I'm Bonk, and I've done a quick review of your PR.

This PR migrates Rust dependency management from vendored crate BUILD files (crates_vendor mode) to crate.from_cargo with a Cargo.toml manifest, deleting ~18K lines of generated Bazel files and upgrading rules_rust from 0.69.0 to 0.70.0.

Issues found (ranked by severity):

  1. Missing derive feature for clap (high): src/rust/gen-compile-cache/main.rs uses #[derive(Parser)] which requires clap's derive feature. The old cargo.bzl included it (features = ["derive", "std", "help"]), but the new Cargo.toml dropped it. The clap_derive crate was also removed from Cargo.lock. This will break the gen-compile-cache binary build.

  2. Stale comments on RUST_TARGET_TRIPLES (low): The "macOS cross-compilation" and "macOS rosetta" comments were carried over from the old 2-entry list. Now that the list has all 5 supported triples, the "macOS rosetta" comment on aarch64-unknown-linux-gnu is incorrect.

  3. Dead config setting groups in deps/rust/BUILD.bazel (low): The five platform config_setting_group definitions were only used by the removed CARGO_BAZEL select and are now unreferenced.

  4. Bare # TODO in lol_html_c_api annotation (low): The TODO comment doesn't describe what needs to be done.

All issues posted as inline review comments with suggestions where applicable.

github run

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 23, 2026

The generated output of @cloudflare/workers-types matches the snapshot in types/generated-snapshot 🎉

@fhanau fhanau force-pushed the felix/030326-rules_rust-no-crate-files branch 2 times, most recently from d8e8dc4 to 39f5b4f Compare April 23, 2026 15:52
@fhanau fhanau marked this pull request as ready for review April 23, 2026 15:52
@fhanau fhanau requested review from a team as code owners April 23, 2026 15:52
@fhanau fhanau requested a review from vicb April 23, 2026 15:52
@fhanau fhanau force-pushed the felix/030326-rules_rust-no-crate-files branch from 39f5b4f to 3bf1c00 Compare April 23, 2026 16:05
Comment thread .github/workflows/deps-updater.yml
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.44%. Comparing base (b322726) to head (3bf1c00).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6643      +/-   ##
==========================================
- Coverage   66.49%   66.44%   -0.06%     
==========================================
  Files         405      405              
  Lines      117814   116097    -1717     
  Branches    19429    19429              
==========================================
- Hits        78342    77142    -1200     
+ Misses      27896    27374     -522     
- Partials    11576    11581       +5     

☔ View full report in Codecov by Sentry.
📢 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.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Apr 23, 2026

Merging this PR will not alter performance

✅ 72 untouched benchmarks
⏩ 129 skipped benchmarks1


Comparing felix/030326-rules_rust-no-crate-files (3bf1c00) with main (b322726)

Open in CodSpeed

Footnotes

  1. 129 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@fhanau fhanau merged commit 9e6e5cb into main Apr 23, 2026
37 of 40 checks passed
@fhanau fhanau deleted the felix/030326-rules_rust-no-crate-files branch April 23, 2026 16:43
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.

4 participants