-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
BUILD
46 lines (41 loc) · 1.09 KB
/
BUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
load("@rules_rust//rust:rust.bzl", "rust_binary", "rust_test")
load("@rules_rust//cargo:cargo_build_script.bzl", "cargo_build_script")
TEMPLATES = glob(["resources/templates/*.mustache"])
cargo_build_script(
name = "build_script",
srcs = ["build.rs"],
build_script_env = {
"RUST_BACKTRACE": "1",
},
data = TEMPLATES
)
rust_binary(
name = "dawn",
srcs = glob(["src/*.rs"]),
deps = [
"//bazel:actix_web",
"//bazel:actix_rt",
"//bazel:log",
"//bazel:log4rs",
"//bazel:serde",
"//bazel:get_if_addrs",
"//bazel:lazy_static",
"//bazel:time",
"//bazel:mustache",
"//bazel:itertools",
"//bazel:percent_encoding",
"//bazel:cookie",
"//bazel:env_logger",
"//bazel:reqwest",
"//bazel:wiremock",
"//bazel:serde_json",
"//bazel:tokio",
":build_script",
],
compile_data = TEMPLATES
)
rust_test(
name = "dawn_test",
crate = ":dawn",
compile_data = TEMPLATES # Known bug https://github.com/bazelbuild/rules_rust/issues/567
)