fork/rules_rust

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

Marcel HlopkoMigrate rules_rust main repository to defs.bzl and smaller rules (#987)bab14a47

0.9.0
508 B26 linesraw
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",
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)