fork/rules_rust
git clone https://git.julia.blue/fork/rules_rust
92834930
rust-analyzer
1"""A module defining dependencies of the `rules_rust` tests""" 2 3load ( "@bazel_tools//tools/build_defs/repo:http.bzl" , "http_archive" ) 4load ( "@bazel_tools//tools/build_defs/repo:utils.bzl" , "maybe" ) 5load ( "//test/load_arbitrary_tool:load_arbitrary_tool_test.bzl" , "load_arbitrary_tool_test" ) 6load ( "//test/unit/toolchain:toolchain_test_utils.bzl" , "rules_rust_toolchain_test_target_json_repository" ) 7 8_LIBC_BUILD_FILE_CONTENT = """\ 9load("@rules_rust//rust:defs.bzl", "rust_library") 10 11rust_library( 12name = "libc", 13srcs = glob(["src/**/*.rs"]), 14edition = "2015", 15rustc_flags = [ 16# In most cases, warnings in 3rd party crates are not interesting as 17# they're out of the control of consumers. The flag here silences 18# warnings. For more details see: 19# https://doc.rust-lang.org/rustc/lints/levels.html 20"--cap-lints=allow", 21], 22visibility = ["//visibility:public"], 23) 24""" 25 26def rules_rust_test_deps (): 27"""Load dependencies for rules_rust tests""" 28 29load_arbitrary_tool_test () 30 31maybe ( 32http_archive , 33name = "libc" , 34build_file_content = _LIBC_BUILD_FILE_CONTENT , 35sha256 = "1ac4c2ac6ed5a8fb9020c166bc63316205f1dc78d4b964ad31f4f21eb73f0c6d" , 36strip_prefix = "libc-0.2.20" , 37urls = [ 38"https://mirror.bazel.build/github.com/rust-lang/libc/archive/0.2.20.zip" , 39"https://github.com/rust-lang/libc/archive/0.2.20.zip" , 40], 41) 42 43maybe ( 44rules_rust_toolchain_test_target_json_repository , 45name = "rules_rust_toolchain_test_target_json" , 46target_json = Label ( "//test/unit/toolchain:toolchain-test-triple.json" ), 47)