fork/rules_rust
git clone https://git.julia.blue/fork/rules_rust
8cb9247f
0.8.1
1load ( "@bazel_skylib//rules:write_file.bzl" , "write_file" ) 2load ( "//rust:defs.bzl" , "rust_binary" ) 3 4package ( default_visibility = [ "//visibility:public" ]) 5 6rust_binary ( 7name = "hello_env" , 8srcs = [ "src/main.rs" ], 9edition = "2018" , 10rustc_env_files = [ ":generate_rustc_env_file" ], 11) 12 13write_file ( 14name = "generate_rustc_env_file" , 15out = "rustc_env_file" , 16content = [ 17"CARGO_PKG_VERSION=1.2.3" , 18"GREETING=Howdy" , 19"" , 20], 21) 22 23sh_test ( 24name = "output_test" , 25srcs = [ "output_test.sh" ], 26args = [ "$(rootpath :hello_env)" ], 27data = [ ":hello_env" ], 28)