1workspace(name = "test_no_std") 2 3local_repository( 4 name = "rules_rust", 5 path = "../../", 6) 7 8local_repository( 9 name = "test_cc_common_link", 10 path = "../cc_common_link/", 11) 12 13load("@rules_rust//rust:repositories.bzl", "rules_rust_dependencies", "rust_register_toolchains") 14 15rules_rust_dependencies() 16 17rust_register_toolchains( 18 edition = "2021", 19 versions = [ 20 "nightly/2023-06-01", 21 "1.70.0", 22 ], 23) 24 25load("@rules_rust//crate_universe:repositories.bzl", "crate_universe_dependencies") 26 27crate_universe_dependencies(bootstrap = True) 28 29load("@rules_rust//crate_universe:defs.bzl", "crate", "crates_repository") 30 31crates_repository( 32 name = "no_std_crate_index", 33 cargo_lockfile = "//:Cargo.Bazel.lock", 34 # `generator` is not necessary in official releases. 35 # See load satement for `cargo_bazel_bootstrap`. 36 generator = "@cargo_bazel_bootstrap//:cargo-bazel", 37 lockfile = "//:cargo-bazel-lock.json", 38 packages = { 39 "libc_alloc": crate.spec( 40 version = "1.0.3", 41 ), 42 }, 43 # Should match the version represented by the currently registered `rust_toolchain`. 44 rust_version = "nightly/2023-06-01", 45) 46 47load( 48 "@no_std_crate_index//:defs.bzl", 49 no_std_repositories = "crate_repositories", 50) 51 52no_std_repositories() 53