diff --git a/third_party/rust/rust.MODULE.bazel b/third_party/rust/rust.MODULE.bazel index 1677a9a8b1d42..ae567cb708560 100644 --- a/third_party/rust/rust.MODULE.bazel +++ b/third_party/rust/rust.MODULE.bazel @@ -76,6 +76,11 @@ crate.from_cargo( name = "crate_index", cargo_lockfile = "//third_party/rust:Cargo.lock", manifests = ["//third_party/rust:Cargo.toml"], + # By default rules_rust will analyze dependencies for all supported target triples, which is very slow. + # Restrict to ones that we're interested in. See https://github.com/bazelbuild/rules_rust/issues/2876 + supported_platform_triples = [ + "x86_64-unknown-linux-gnu", + ], ) crate.annotation( crate = "libudev-sys", @@ -124,6 +129,9 @@ crate.from_cargo( name = "mdbook_index", cargo_lockfile = "//third_party/mdbook:Cargo.lock", manifests = ["//third_party/mdbook:Cargo.toml"], + supported_platform_triples = [ + "x86_64-unknown-linux-gnu", + ], ) crate.annotation( crate = "mdbook", diff --git a/third_party/tock/tock.MODULE.bazel b/third_party/tock/tock.MODULE.bazel index 6272af8b5cbf6..e7bd314f52924 100644 --- a/third_party/tock/tock.MODULE.bazel +++ b/third_party/tock/tock.MODULE.bazel @@ -9,6 +9,9 @@ crate.from_cargo( name = "tock_index", cargo_lockfile = "//third_party/tock:Cargo.lock", manifests = ["//third_party/tock:Cargo.toml"], + supported_platform_triples = [ + "riscv32imc-unknown-none-elf", + ], ) use_repo(crate, "tock_index") @@ -17,6 +20,9 @@ crate.from_cargo( name = "elf2tab_index", cargo_lockfile = "@elf2tab//:Cargo.lock", manifests = ["@elf2tab//:Cargo.toml"], + supported_platform_triples = [ + "x86_64-unknown-linux-gnu", + ], ) use_repo(crate, "elf2tab_index")