fork/rules_rust
git clone https://git.julia.blue/fork/rules_rust
bddc4bd9
0.11.0
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" ) 6 7_LIBC_BUILD_FILE_CONTENT = """\ 8load("@rules_rust//rust:defs.bzl", "rust_library") 9 10rust_library( 11name = "libc", 12srcs = glob(["src/**/*.rs"]), 13edition = "2015", 14rustc_flags = [ 15# In most cases, warnings in 3rd party crates are not interesting as 16# they're out of the control of consumers. The flag here silences 17# warnings. For more details see: 18# https://doc.rust-lang.org/rustc/lints/levels.html 19"--cap-lints=allow", 20], 21visibility = ["//visibility:public"], 22) 23""" 24 25def rules_rust_test_deps (): 26"""Load dependencies for rules_rust tests""" 27 28load_arbitrary_tool_test () 29 30maybe ( 31http_archive , 32name = "libc" , 33build_file_content = _LIBC_BUILD_FILE_CONTENT , 34sha256 = "1ac4c2ac6ed5a8fb9020c166bc63316205f1dc78d4b964ad31f4f21eb73f0c6d" , 35strip_prefix = "libc-0.2.20" , 36urls = [ 37"https://mirror.bazel.build/github.com/rust-lang/libc/archive/0.2.20.zip" , 38"https://github.com/rust-lang/libc/archive/0.2.20.zip" , 39], 40)