-
Notifications
You must be signed in to change notification settings - Fork 285
/
TARGETS
49 lines (47 loc) · 1.6 KB
/
TARGETS
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
load("@fbcode_macros//build_defs:rust_library.bzl", "rust_library")
oncall("sapling")
rust_library(
name = "minibytes",
srcs = glob(["src/**/*.rs"]),
autocargo = {"cargo_toml_config": {
"features": {
"default": [
"frombytes",
"frommmap",
"non-zerocopy-into",
],
"frombytes": ["bytes"],
"frommmap": ["memmap2"],
"non-zerocopy-into": [],
},
"lib": {"name": "minibytes"},
"package": {
"authors": ["Meta Source Control Team <[email protected]>"],
"description": "Shared reference-counted bytes and str with zero-copy slicing support.",
"homepage": "https://sapling-scm.com/",
"license": "MIT",
"name": "sapling-minibytes",
"repository": "https://github.com/facebook/sapling",
},
}},
crate_root = "src/lib.rs",
features = [
"frombytes",
"frommmap",
"non-zerocopy-into",
],
test_deps = [
"fbsource//third-party/rust:quickcheck",
"fbsource//third-party/rust:serde_cbor",
],
# A test inside this target is using #[should_panic], setting the backtrace
# to false here, otherwise the test binary will try to extract the backtrace
# and the test will fail with leak sanatizer.
test_env = {"RUST_BACKTRACE": "0"},
test_labels = ["tpx-rust-no-backtrace-workaround"],
deps = [
"fbsource//third-party/rust:bytes",
"fbsource//third-party/rust:memmap2",
"fbsource//third-party/rust:serde",
],
)