[bazel] Move rules_rust to bzlmod#16566
Conversation
Bazel 9 is coming out soon, and that drops support for workspace-based builds. Preempt this by moving `rules_rust` into the module file.
PR Compliance Guide 🔍(Compliance updated until commit 8856014)Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label Previous compliance checksCompliance check up to commit edf3fcb
|
||||||||||||||||||||||||||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||
User description
Bazel 9 is coming out soon, and that drops support for workspace-based builds. Preempt this by moving
rules_rustinto the module file.PR Type
Enhancement
Description
Migrate
rules_rustfrom WORKSPACE to MODULE.bazel for Bazel 9 compatibilityUpdate multiple Bazel dependency versions to latest stable releases
Configure Rust toolchain and crate universe extensions via bzlmod
Remove legacy workspace-based Rust configuration and dependencies
Diagram Walkthrough
File Walkthrough
MODULE.bazel
Add rules_rust and configure Rust extensionsMODULE.bazel
rules_rustv0.67.0 as a bazel_depbazel_skylib, buildifier_prebuilt, platforms, rules_cc)
WORKSPACE
Remove legacy workspace-based Rust configurationWORKSPACE
rules_rusthttp_archive definitionrules_rust_dependencies()andrust_register_toolchains()callscrates_repository()configurationcrate_repositories()andcargo_dependencies()loading