fork/rules_rust

git clone https://git.julia.blue/fork/rules_rust

David TolnayOutside of examples, fill in all `edition` attrs (#1257)03a70796

0.5.0
529 B23 linesraw
1load("//rust:defs.bzl", "rust_binary")
2
3package(default_visibility = ["//visibility:public"])
4
5rust_binary(
6    name = "hello_env",
7    srcs = ["src/main.rs"],
8    edition = "2018",
9    rustc_env_files = [":generate_rustc_env_file"],
10)
11
12genrule(
13    name = "generate_rustc_env_file",
14    outs = ["rustc_env_file"],
15    cmd = "echo CARGO_PKG_VERSION=1.2.3 >> $@ && echo GREETING=Howdy >> $@",
16)
17
18sh_test(
19    name = "output_test",
20    srcs = ["output_test.sh"],
21    args = ["$(location :hello_env)"],
22    data = [":hello_env"],
23)