blob: f7f20ffdef7b3cc87e7347d369e631b77b30cf87 [file] [log] [blame]
load("//rust:defs.bzl", "rust_binary", "rust_test")
rust_binary(
name = "hello-world",
srcs = ["src/main.rs"],
edition = "2018",
)
filegroup(
name = "hello_world_main",
srcs = ["src/main.rs"],
)
rust_test(
name = "test",
srcs = ["tests/run.rs"],
data = [
":hello-world",
":hello_world_main",
],
edition = "2018",
env = {
"FERRIS_SAYS": "Hello fellow Rustaceans!",
"HELLO_WORLD_BIN_ROOTPATH": "$(rootpath :hello-world)",
"HELLO_WORLD_SRC_EXECPATH": "$(execpath :hello_world_main)",
},
)