[bazel] Swap to rules_rs for Rust build rules#17398
Conversation
Review Summary by QodoMigrate Rust build rules from rules_rust to rules_rs
WalkthroughsDescription• Migrate Rust build system from rules_rust to rules_rs • Simplify Cargo dependency management without bazel lockfiles • Remove manual cargo repinning task and workflow • Add platform-specific constraints for Linux and Windows • Update Bazel module dependencies and toolchain configuration File Changes1. MODULE.bazel
|
Code Review by Qodo
1. Missing rust:update task
|
|
@dzbarsky could you sign the CLA before we can look to merge it? |
19bc642 to
6a0166d
Compare
yep, all good! |
shs96c
left a comment
There was a problem hiding this comment.
I like the idea. Just a question.... Also, was this tested on macOS?
|
@cgoldberg thanks for pointing out the |
|
@dzbarsky yea, I think your workflow changes look correct. thanks. |
|
@cgoldberg I had a CI failure with the remote build using a platform without the constraint and thus failing toolchain resolution. Updated and repushed, could you help trigger CI? Would love a bit of help getting this in! |
It's running now |
hmm i'm not sure how target selection is implemented but Rust job was skipped, that seems dangerous :) |
I'm not sure how the target selection works either, and I can't figure out how to trigger the Rust job manually on your branch :/ |
|
CI is failing all over the place because GitHub Actions is having issues right now. I'll try to figure it out once they get things stabilized. |
c0fbd58 to
26149f2
Compare
|
build is failing on Windows: https://github.com/SeleniumHQ/selenium/actions/runs/25440138960/job/74647344814?pr=17398#step:23:196 |
Yep I need to fix @llvm module. Mentioned to Simon on slack but should have posted here as well to keep you in the loop. My bad! |
51e7a73 to
7a4953b
Compare
It looks like David has responded to all the requested changes, and it also sounds like the rake workflow should work too.
💥 What does this PR do?
This PR migrates to using rules_rs instead of rules_rust for our Cargo lockfile integration and toolchains. rules_rs is a redesign ruleset that can operate directly on Cargo.toml/Cargo.lock without the need for additional bazel lockfiles or a bazel-specific repin operation. The toolchains are also optimized to minimize downloads of duplicative bytes compared to the default rules_rust ones.
🔧 Implementation Notes
This was straightforward.
🤖 AI assistance
Codex 0-shot :) It followed the instructions in rules_rs README perfectly.
💡 Additional Considerations
N/a
🔄 Types of changes
Cleanup / build ergonomics improvement