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