-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
BUILD
76 lines (73 loc) · 1.74 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
load(
"@rules_rust//rust:defs.bzl",
"rust_binary",
"rust_clippy",
"rust_library",
"rust_test",
"rustfmt_test",
)
rust_library(
name = "ftzz_lib",
srcs = [
"src/errors.rs",
"src/generator.rs",
"src/lib.rs",
],
crate_name = "ftzz",
proc_macro_deps = [
"//third_party/cargo:derive_new",
],
deps = [
"//third_party/cargo:anyhow",
"//third_party/cargo:clap_num",
"//third_party/cargo:exitcode",
"//third_party/cargo:futures",
"//third_party/cargo:log",
"//third_party/cargo:nix",
"//third_party/cargo:num_cpus",
"//third_party/cargo:num_format",
"//third_party/cargo:rand",
"//third_party/cargo:rand_distr",
"//third_party/cargo:rand_xorshift",
"//third_party/cargo:structopt",
"//third_party/cargo:tokio",
],
)
rust_binary(
name = "ftzz",
srcs = [
"src/main.rs",
],
rustc_flags = select({
"//tools/config:release_build": [
"-Copt-level=3",
"-Clto",
"-Ccodegen-units=1",
"-Zstrip=symbols",
],
"//conditions:default": [],
}),
deps = [
":ftzz_lib",
"//third_party/cargo:clap_verbosity_flag",
"//third_party/cargo:simple_logger",
"//third_party/cargo:structopt",
],
)
rust_test(
name = "ftzz_test",
srcs = [
"tests/generator.rs",
],
data = glob(["testdata/**/*.hash"]),
proc_macro_deps = [
"//third_party/cargo:rstest",
],
rustc_flags = ["--cfg=bazel"],
deps = [
":ftzz_lib",
"//third_party/cargo:seahash",
"//third_party/cargo:tempfile",
"@rules_rust//tools/runfiles",
],
)