-
Notifications
You must be signed in to change notification settings - Fork 294
/
BUILD.bazel
97 lines (93 loc) · 3.07 KB
/
BUILD.bazel
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test", "rust_test_suite")
package(default_visibility = ["//visibility:public"])
rust_library(
name = "messaging",
srcs = glob(["src/**"]),
crate_features = select({
"//bazel:malicious_code_enabled": ["malicious_code"],
"//conditions:default": [],
}),
crate_name = "ic_messaging",
version = "0.8.0",
deps = [
"//rs/canonical_state/certification_version",
"//rs/config",
"//rs/constants",
"//rs/crypto/internal/crypto_lib/basic_sig/ed25519",
"//rs/crypto/tree_hash",
"//rs/crypto/utils/threshold_sig_der",
"//rs/cycles_account_manager",
"//rs/interfaces",
"//rs/interfaces/certified_stream_store",
"//rs/interfaces/registry",
"//rs/interfaces/state_manager",
"//rs/monitoring/logger",
"//rs/monitoring/metrics",
"//rs/protobuf",
"//rs/registry/helpers",
"//rs/registry/keys",
"//rs/registry/provisional_whitelist",
"//rs/registry/routing_table",
"//rs/registry/subnet_features",
"//rs/registry/subnet_type",
"//rs/replicated_state",
"//rs/types/base_types",
"//rs/types/error_types",
"//rs/types/ic00_types",
"//rs/types/types",
"//rs/utils",
"@crate_index//:prometheus",
"@crate_index//:slog",
],
)
rust_test(
name = "messaging_test",
crate = ":messaging",
deps = [
"//rs/interfaces/state_manager/mocks",
"//rs/registry/fake",
"//rs/registry/local_registry",
"//rs/registry/local_store",
"//rs/registry/local_store/artifacts",
"//rs/registry/proto_data_provider",
"//rs/test_utilities",
"//rs/test_utilities/execution_environment",
"//rs/test_utilities/logger",
"//rs/test_utilities/metrics",
"//rs/test_utilities/registry",
"@crate_index//:assert_matches",
"@crate_index//:candid",
"@crate_index//:lazy_static",
"@crate_index//:maplit",
"@crate_index//:mockall_0_7_2",
"@crate_index//:rand_0_8_4",
"@crate_index//:rand_chacha_0_3_1",
"@crate_index//:tempfile",
],
)
rust_test_suite(
name = "messaging_integration",
srcs = glob(["tests/**/*.rs"]),
data = ["//rs/rust_canisters/xnet_test:xnet-test-canister"],
env = {
"XNET_TEST_CANISTER_WASM_PATH": "$(rootpath //rs/rust_canisters/xnet_test:xnet-test-canister)",
},
deps = [
":messaging",
"//rs/interfaces/certified_stream_store",
"//rs/registry/routing_table",
"//rs/registry/subnet_type",
"//rs/replicated_state",
"//rs/rust_canisters/canister_test",
"//rs/rust_canisters/xnet_test",
"//rs/state_machine_tests",
"//rs/test_utilities",
"//rs/test_utilities/metrics",
"//rs/types/base_types",
"//rs/types/ic00_types",
"//rs/types/types",
"@crate_index//:assert_matches",
"@crate_index//:candid",
"@crate_index//:maplit",
],
)