blob: f1ce1b218415c136121302ce2e052d4d7d1ccb3e [file] [log] [blame]
load("//rust:defs.bzl", "rust_binary")
package(default_visibility = ["//visibility:public"])
rust_binary(
name = "hello_env",
srcs = ["src/main.rs"],
edition = "2018",
rustc_env_files = [":generate_rustc_env_file"],
)
genrule(
name = "generate_rustc_env_file",
outs = ["rustc_env_file"],
cmd = "echo CARGO_PKG_VERSION=1.2.3 >> $@ && echo GREETING=Howdy >> $@",
)
sh_test(
name = "output_test",
srcs = ["output_test.sh"],
args = ["$(location :hello_env)"],
data = [":hello_env"],
)