fork/rules_rust

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

Chris FredricksonBuild `rust_test` targets with `crate` using the same crate name as the underlying library target. (#1332)10185339

0.8.0
442 B24 linesraw
1load("//rust:defs.bzl", "rust_binary", "rust_library", "rust_test")
2
3package(default_visibility = ["//visibility:public"])
4
5rust_library(
6    name = "hello_lib",
7    srcs = [
8        "src/greeter.rs",
9        "src/lib.rs",
10    ],
11    edition = "2018",
12)
13
14rust_binary(
15    name = "hello_world",
16    srcs = ["src/main.rs"],
17    edition = "2018",
18    deps = [":hello_lib"],
19)
20
21rust_test(
22    name = "hello_lib_test",
23    crate = ":hello_lib",
24)