forked from RobotLocomotion/drake
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[workspace] Add rust_toolchain externals (RobotLocomotion#20325)
- Loading branch information
1 parent
7cb258c
commit 44546f1
Showing
19 changed files
with
1,004 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
load("//tools/lint:lint.bzl", "add_lint_tests") | ||
|
||
add_lint_tests( | ||
python_lint_extra_srcs = ["upgrade.py"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
The bazel @rules_rust toolchain logic contains a lot of load-time options that | ||
make it difficult to pin down exactly what is being fetched. However for Drake, | ||
we want to keep a carefully inventory of what we're using. | ||
|
||
To that end, we "vendor" the result of what rust_register_toolchains() would | ||
usually do and commit the information into Drake. That vendored information is | ||
created by the `update.sh` script and lives in the `lock/**` subdirectory tree. | ||
|
||
In short, we pin pointers to rust-lang.org downloads for the compiler, standard | ||
library, etc. along with sha256 checksums and generated BUILD wrapper files. | ||
|
||
The rustc version is governed by whatever @rules_rust pins to by default. | ||
|
||
The `upgrade.py` script is a fully-automatic mechanism to upgrade the pinned | ||
toolchain after an upgrade to @rules_rust. It uses the `upgrade` directory as | ||
a scratch workspace to help bootstrap the process. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,224 @@ | ||
# This file is automatically generated by upgrade.py. | ||
|
||
ARCHIVES = [ | ||
dict( | ||
name = "rust_darwin_aarch64__aarch64-apple-darwin__stable", | ||
build_file = Label("@drake//tools/workspace/rust_toolchain:lock/details/BUILD.rust_darwin_aarch64__aarch64-apple-darwin__stable.bazel"), | ||
downloads = "[]", | ||
), | ||
dict( | ||
name = "rust_darwin_aarch64__aarch64-apple-darwin__stable_tools", | ||
build_file = Label("@drake//tools/workspace/rust_toolchain:lock/details/BUILD.rust_darwin_aarch64__aarch64-apple-darwin__stable_tools.bazel"), | ||
downloads = json.encode( | ||
[ | ||
{ | ||
"sha256": "53fa11e327a57a147a1cafd58a6fa04d90db67d6b7f62b67d586b23cb2da3cb7", | ||
"stripPrefix": "rustc-1.72.1-aarch64-apple-darwin/rustc", | ||
"url": [ | ||
"https://static.rust-lang.org/dist/rustc-1.72.1-aarch64-apple-darwin.tar.gz", | ||
], | ||
}, | ||
{ | ||
"sha256": "68997a26526ec5ae25c9d9f1c35cd60be8a094b5388644c2e5ccce2b55c3777d", | ||
"stripPrefix": "clippy-1.72.1-aarch64-apple-darwin/clippy-preview", | ||
"url": [ | ||
"https://static.rust-lang.org/dist/clippy-1.72.1-aarch64-apple-darwin.tar.gz", | ||
], | ||
}, | ||
{ | ||
"sha256": "bd1364c57bdbf95c3b54a609ba85052490615274a4514c35f2515ec1aa65d26c", | ||
"stripPrefix": "cargo-1.72.1-aarch64-apple-darwin/cargo", | ||
"url": [ | ||
"https://static.rust-lang.org/dist/cargo-1.72.1-aarch64-apple-darwin.tar.gz", | ||
], | ||
}, | ||
{ | ||
"sha256": "16024a4bbcfb417c672f42c781352cc48bec6431559ccb50fe17a8a1af15ccda", | ||
"stripPrefix": "rustfmt-1.72.1-aarch64-apple-darwin/rustfmt-preview", | ||
"url": [ | ||
"https://static.rust-lang.org/dist/rustfmt-1.72.1-aarch64-apple-darwin.tar.gz", | ||
], | ||
}, | ||
{ | ||
"sha256": "70a9a6db8d424b85433c200c5e08d0592a4f32ff30f1802bff0208ce591019bb", | ||
"stripPrefix": "llvm-tools-1.72.1-aarch64-apple-darwin/llvm-tools-preview", | ||
"url": [ | ||
"https://static.rust-lang.org/dist/llvm-tools-1.72.1-aarch64-apple-darwin.tar.gz", | ||
], | ||
}, | ||
{ | ||
"sha256": "45adf6906c1a277508f6dd080f74dc35b3db2efc94f39bd6c007f75180b7bba0", | ||
"stripPrefix": "rust-std-1.72.1-aarch64-apple-darwin/rust-std-aarch64-apple-darwin", | ||
"url": [ | ||
"https://static.rust-lang.org/dist/rust-std-1.72.1-aarch64-apple-darwin.tar.gz", | ||
], | ||
}, | ||
], | ||
), | ||
), | ||
dict( | ||
name = "rust_darwin_x86_64__x86_64-apple-darwin__stable", | ||
build_file = Label("@drake//tools/workspace/rust_toolchain:lock/details/BUILD.rust_darwin_x86_64__x86_64-apple-darwin__stable.bazel"), | ||
downloads = "[]", | ||
), | ||
dict( | ||
name = "rust_darwin_x86_64__x86_64-apple-darwin__stable_tools", | ||
build_file = Label("@drake//tools/workspace/rust_toolchain:lock/details/BUILD.rust_darwin_x86_64__x86_64-apple-darwin__stable_tools.bazel"), | ||
downloads = json.encode( | ||
[ | ||
{ | ||
"sha256": "ddd7ef3194f717ffbbc9520a4b1b292ed2f76c503004c806bd59b27b976a01aa", | ||
"stripPrefix": "rustc-1.72.1-x86_64-apple-darwin/rustc", | ||
"url": [ | ||
"https://static.rust-lang.org/dist/rustc-1.72.1-x86_64-apple-darwin.tar.gz", | ||
], | ||
}, | ||
{ | ||
"sha256": "ac876eb8c55a2d6f45b2436619a59dbc93deccecfa0526a2f248726d7ef19359", | ||
"stripPrefix": "clippy-1.72.1-x86_64-apple-darwin/clippy-preview", | ||
"url": [ | ||
"https://static.rust-lang.org/dist/clippy-1.72.1-x86_64-apple-darwin.tar.gz", | ||
], | ||
}, | ||
{ | ||
"sha256": "68ebee1ff497c4c2c67033b5ad1f8ff53a96097094a75a27596699483d1f8a17", | ||
"stripPrefix": "cargo-1.72.1-x86_64-apple-darwin/cargo", | ||
"url": [ | ||
"https://static.rust-lang.org/dist/cargo-1.72.1-x86_64-apple-darwin.tar.gz", | ||
], | ||
}, | ||
{ | ||
"sha256": "39fba27f59ee5c09b79b6bb25313ebc2ac48952f8af7a0a8669d8d34fdf0cc47", | ||
"stripPrefix": "rustfmt-1.72.1-x86_64-apple-darwin/rustfmt-preview", | ||
"url": [ | ||
"https://static.rust-lang.org/dist/rustfmt-1.72.1-x86_64-apple-darwin.tar.gz", | ||
], | ||
}, | ||
{ | ||
"sha256": "5f9b3ae0f571b442f314cde95bb7a3a99d15404db59269e254030e7b8de461da", | ||
"stripPrefix": "llvm-tools-1.72.1-x86_64-apple-darwin/llvm-tools-preview", | ||
"url": [ | ||
"https://static.rust-lang.org/dist/llvm-tools-1.72.1-x86_64-apple-darwin.tar.gz", | ||
], | ||
}, | ||
{ | ||
"sha256": "a984c8b97237edd50641b32cc14dde199fb37e2118490514c7c9777bab772532", | ||
"stripPrefix": "rust-std-1.72.1-x86_64-apple-darwin/rust-std-x86_64-apple-darwin", | ||
"url": [ | ||
"https://static.rust-lang.org/dist/rust-std-1.72.1-x86_64-apple-darwin.tar.gz", | ||
], | ||
}, | ||
], | ||
), | ||
), | ||
dict( | ||
name = "rust_linux_aarch64__aarch64-unknown-linux-gnu__stable", | ||
build_file = Label("@drake//tools/workspace/rust_toolchain:lock/details/BUILD.rust_linux_aarch64__aarch64-unknown-linux-gnu__stable.bazel"), | ||
downloads = "[]", | ||
), | ||
dict( | ||
name = "rust_linux_aarch64__aarch64-unknown-linux-gnu__stable_tools", | ||
build_file = Label("@drake//tools/workspace/rust_toolchain:lock/details/BUILD.rust_linux_aarch64__aarch64-unknown-linux-gnu__stable_tools.bazel"), | ||
downloads = json.encode( | ||
[ | ||
{ | ||
"sha256": "04d75869d1c0f01e365d5d579456a81e817ed97463b70e7c273d031c48d2838b", | ||
"stripPrefix": "rustc-1.72.1-aarch64-unknown-linux-gnu/rustc", | ||
"url": [ | ||
"https://static.rust-lang.org/dist/rustc-1.72.1-aarch64-unknown-linux-gnu.tar.gz", | ||
], | ||
}, | ||
{ | ||
"sha256": "463f32172cdd6df9a13690652e1da63e8689b8267b9996a9cc890fc7fec67eb3", | ||
"stripPrefix": "clippy-1.72.1-aarch64-unknown-linux-gnu/clippy-preview", | ||
"url": [ | ||
"https://static.rust-lang.org/dist/clippy-1.72.1-aarch64-unknown-linux-gnu.tar.gz", | ||
], | ||
}, | ||
{ | ||
"sha256": "ad282984ef42304a1c700ecf47f75344c69bdcc0f682d61c46a8584d6e3e904b", | ||
"stripPrefix": "cargo-1.72.1-aarch64-unknown-linux-gnu/cargo", | ||
"url": [ | ||
"https://static.rust-lang.org/dist/cargo-1.72.1-aarch64-unknown-linux-gnu.tar.gz", | ||
], | ||
}, | ||
{ | ||
"sha256": "9010f967c04ca295fe495a153b8c1880cc04c874fb4b04cbfd231a75d2a6341d", | ||
"stripPrefix": "rustfmt-1.72.1-aarch64-unknown-linux-gnu/rustfmt-preview", | ||
"url": [ | ||
"https://static.rust-lang.org/dist/rustfmt-1.72.1-aarch64-unknown-linux-gnu.tar.gz", | ||
], | ||
}, | ||
{ | ||
"sha256": "b3ea855011ac898b51dea2891d1cec1cc22dbd1e9b9f8306e772b1258e447040", | ||
"stripPrefix": "llvm-tools-1.72.1-aarch64-unknown-linux-gnu/llvm-tools-preview", | ||
"url": [ | ||
"https://static.rust-lang.org/dist/llvm-tools-1.72.1-aarch64-unknown-linux-gnu.tar.gz", | ||
], | ||
}, | ||
{ | ||
"sha256": "7c43a6f56b100ce929967ef0d34fa316e0c4b233cb3ba84db67832135006c403", | ||
"stripPrefix": "rust-std-1.72.1-aarch64-unknown-linux-gnu/rust-std-aarch64-unknown-linux-gnu", | ||
"url": [ | ||
"https://static.rust-lang.org/dist/rust-std-1.72.1-aarch64-unknown-linux-gnu.tar.gz", | ||
], | ||
}, | ||
], | ||
), | ||
), | ||
dict( | ||
name = "rust_linux_x86_64__x86_64-unknown-linux-gnu__stable", | ||
build_file = Label("@drake//tools/workspace/rust_toolchain:lock/details/BUILD.rust_linux_x86_64__x86_64-unknown-linux-gnu__stable.bazel"), | ||
downloads = "[]", | ||
), | ||
dict( | ||
name = "rust_linux_x86_64__x86_64-unknown-linux-gnu__stable_tools", | ||
build_file = Label("@drake//tools/workspace/rust_toolchain:lock/details/BUILD.rust_linux_x86_64__x86_64-unknown-linux-gnu__stable_tools.bazel"), | ||
downloads = json.encode( | ||
[ | ||
{ | ||
"sha256": "9cf84e4de7302644e8c68b8d2abf6ac9e2b56409c3fa5b2ab95168bfaa5c562d", | ||
"stripPrefix": "rustc-1.72.1-x86_64-unknown-linux-gnu/rustc", | ||
"url": [ | ||
"https://static.rust-lang.org/dist/rustc-1.72.1-x86_64-unknown-linux-gnu.tar.gz", | ||
], | ||
}, | ||
{ | ||
"sha256": "5e7bcb8ef851a4d66b4aee533dab122a56d5f24992822b78d0244c1f859c3cb8", | ||
"stripPrefix": "clippy-1.72.1-x86_64-unknown-linux-gnu/clippy-preview", | ||
"url": [ | ||
"https://static.rust-lang.org/dist/clippy-1.72.1-x86_64-unknown-linux-gnu.tar.gz", | ||
], | ||
}, | ||
{ | ||
"sha256": "8eeb3412ddec7be32bb8599a7d86c8a5e3a09b82ca8d870f3b30133bf478a155", | ||
"stripPrefix": "cargo-1.72.1-x86_64-unknown-linux-gnu/cargo", | ||
"url": [ | ||
"https://static.rust-lang.org/dist/cargo-1.72.1-x86_64-unknown-linux-gnu.tar.gz", | ||
], | ||
}, | ||
{ | ||
"sha256": "7c4f1ce681b0c8d4da15fddf5cd0a7dc91917b79ae74ac917d0270fb2ec43c90", | ||
"stripPrefix": "rustfmt-1.72.1-x86_64-unknown-linux-gnu/rustfmt-preview", | ||
"url": [ | ||
"https://static.rust-lang.org/dist/rustfmt-1.72.1-x86_64-unknown-linux-gnu.tar.gz", | ||
], | ||
}, | ||
{ | ||
"sha256": "fb0850d5853780826cc60b5e16a9fcfcd7305c0c65314bbaaa92efb27d8d54bb", | ||
"stripPrefix": "llvm-tools-1.72.1-x86_64-unknown-linux-gnu/llvm-tools-preview", | ||
"url": [ | ||
"https://static.rust-lang.org/dist/llvm-tools-1.72.1-x86_64-unknown-linux-gnu.tar.gz", | ||
], | ||
}, | ||
{ | ||
"sha256": "d5d3751b4558864fd95f17b1b6eaeff3130a3de1a6920750a3b8c6b0fa03fb1c", | ||
"stripPrefix": "rust-std-1.72.1-x86_64-unknown-linux-gnu/rust-std-x86_64-unknown-linux-gnu", | ||
"url": [ | ||
"https://static.rust-lang.org/dist/rust-std-1.72.1-x86_64-unknown-linux-gnu.tar.gz", | ||
], | ||
}, | ||
], | ||
), | ||
), | ||
] |
10 changes: 10 additions & 0 deletions
10
...rust_toolchain/lock/details/BUILD.rust_darwin_aarch64__aarch64-apple-darwin__stable.bazel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# This file is automatically generated by upgrade.py. | ||
|
||
toolchain( | ||
name = "toolchain", | ||
exec_compatible_with = ["@platforms//cpu:aarch64","@platforms//os:osx"], | ||
target_compatible_with = ["@platforms//cpu:aarch64","@platforms//os:osx"], | ||
toolchain = "@rust_darwin_aarch64__aarch64-apple-darwin__stable_tools//:rust_toolchain", | ||
toolchain_type = "@rules_rust//rust:toolchain", | ||
target_settings = ["@rules_rust//rust/toolchain/channel:stable"], | ||
) |
Oops, something went wrong.