fork/rules_rust
git clone https://git.julia.blue/fork/rules_rust
abf2ae9f
patching
1load ( "@bazel_skylib//rules:build_test.bzl" , "build_test" ) 2load ( "@rules_rust//rust:defs.bzl" , "rust_binary" , "rust_doc" ) 3 4package ( default_visibility = [ "//visibility:public" ]) 5 6rust_binary ( 7name = "hello_world_transient" , 8srcs = [ "src/main.rs" ], 9deps = [ 10"@crates//:anyhow" , 11], 12) 13 14rust_binary ( 15name = "hello_world_vendored" , 16srcs = [ "src/main.rs" ], 17deps = [ 18"//third-party/crates:anyhow" , 19], 20) 21 22[ 23rust_doc ( 24name = "hello_world_{}_doc" . format ( target ), 25crate = ":hello_world_{}" . format ( target ), 26) 27for target in [ 28"transient" , 29"vendored" , 30] 31] 32 33[ 34sh_test ( 35name = "hello_world_{}_test" . format ( target ), 36srcs = [ "hello_world_test.sh" ], 37args = [ 38"$(rlocationpath :hello_world_{})" . format ( target ), 39], 40data = [ 41":hello_world_{}" . format ( target ), 42], 43deps = [ 44"@bazel_tools//tools/bash/runfiles" , 45], 46) 47for target in [ 48"transient" , 49"vendored" , 50] 51] 52 53build_test ( 54name = "gen_rust_project" , 55targets = [ 56"@rules_rust//tools/rust_analyzer:gen_rust_project" , 57], 58) 59 60build_test ( 61name = "rust_fmt" , 62targets = [ 63"@rules_rust//:rustfmt" , 64], 65)