| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 1 | rust = use_extension("@rules_rust//rust:extensions.bzl", "rust") |
| 2 | rust.toolchain( |
| 3 | edition = "2021", |
| 4 | extra_target_triples = [ |
| 5 | "x86_64-unknown-uefi", |
| 6 | ], |
| Tim Windelschmidt | 9eab31c | 2024-10-23 12:33:36 +0200 | [diff] [blame] | 7 | versions = ["1.82.0"], |
| 8 | extra_rustc_flags = ["-Clinker=rust-lld"], |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 9 | ) |
| 10 | use_repo(rust, "rust_toolchains") |
| 11 | |
| 12 | crate = use_extension("@rules_rust//crate_universe:extension.bzl", "crate") |
| 13 | crate.from_cargo( |
| 14 | name = "crate_index", |
| 15 | cargo_lockfile = "//third_party/rust:Cargo.lock", |
| 16 | generate_binaries = True, |
| 17 | manifests = ["//third_party/rust:Cargo.toml"], |
| 18 | ) |
| 19 | crate.from_cargo( |
| 20 | name = "crate_index_efi", |
| 21 | cargo_lockfile = "//third_party/rust_efi:Cargo.lock", |
| 22 | generate_binaries = True, |
| 23 | manifests = ["//third_party/rust_efi:Cargo.toml"], |
| 24 | supported_platform_triples = [ |
| 25 | "x86_64-unknown-linux-gnu", |
| 26 | "x86_64-unknown-uefi", |
| 27 | ], |
| 28 | ) |
| 29 | use_repo(crate, "crate_index") |
| 30 | use_repo(crate, "crate_index_efi") |