• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1load("//rust:defs.bzl", "rust_binary", "rust_test")
2
3rust_binary(
4    name = "hello-world",
5    srcs = ["src/main.rs"],
6    edition = "2018",
7)
8
9filegroup(
10    name = "hello_world_main",
11    srcs = ["src/main.rs"],
12)
13
14rust_test(
15    name = "test_run",
16    srcs = ["tests/run.rs"],
17    data = [
18        ":hello-world",
19        ":hello_world_main",
20    ],
21    edition = "2018",
22    env = {
23        "FERRIS_SAYS": "Hello fellow Rustaceans!",
24        "HELLO_WORLD_BIN_ROOTPATH": "$(rootpath :hello-world)",
25    },
26)
27
28rust_test(
29    name = "test_manifest_dir",
30    srcs = ["tests/manifest_dir.rs"],
31    data = ["src/manifest_dir_file.txt"],
32    edition = "2018",
33)
34