1# This file is part of ICU4X. For terms of use, please see the file
2# called LICENSE at the top level of the ICU4X source tree
3# (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
4
5[package]
6name = "zerovec"
7description = "Zero-copy vector backed by a byte array"
8version = "0.10.4"
9categories = ["rust-patterns", "memory-management", "caching", "no-std", "data-structures"]
10keywords = ["zerocopy", "serialization", "zero-copy", "serde"]
11
12authors.workspace = true
13edition.workspace = true
14include.workspace = true
15license.workspace = true
16repository.workspace = true
17rust-version.workspace = true
18
19[package.metadata.workspaces]
20independent = true
21
22[package.metadata.docs.rs]
23all-features = true
24
25[dependencies]
26zerofrom = { workspace = true }
27
28zerovec-derive = { workspace = true, optional = true}
29
30databake = { workspace = true, features = ["derive"], optional = true }
31serde = { workspace = true, features = ["alloc"], optional = true }
32
33# Special dep for yoke: avoid non-breaking zerovec bumps requiring breaking yoke bumps
34# Can be reset on next zerovec breaking if necessary
35#
36# This effectively stands for the range `~0.6 OR ~0.7`, i.e. it supports all 0.6 versions
37# and all 0.7 versions, but not further.
38yoke = { version = ">=0.6.0, <0.8.0", path = "../yoke", optional = true }
39twox-hash = { workspace = true, optional = true }
40
41[dev-dependencies]
42bincode = { workspace = true }
43getrandom = { workspace = true, features = ["js"] }
44iai = { workspace = true }
45icu_benchmark_macros = { path = "../../tools/benchmark/macros" }
46postcard = { workspace = true, features = ["use-std"] }
47rand = { workspace = true }
48rand_distr = { workspace = true }
49rand_pcg = { workspace = true }
50rmp-serde = { workspace = true }
51serde = { workspace = true, features = ["derive"] }
52serde_json = { workspace = true }
53yoke = { path = "../../utils/yoke", features = ["derive"] }
54zerofrom = { path = "../../utils/zerofrom", features = ["derive"] }
55
56[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
57criterion = { workspace = true }
58
59[features]
60std = []
61derive = ["dep:zerovec-derive"]
62hashmap = ["dep:twox-hash"]
63bench = ["serde", "databake"]
64yoke = ["dep:yoke"]
65serde = ["dep:serde"]
66databake = ["dep:databake"]
67
68[package.metadata.cargo-all-features]
69# Bench feature gets tested separately and is only relevant for CI
70denylist = ["bench"]
71# We have tons of features here, limit the amount of tests we run
72max_combination_size = 3
73
74[lib]
75bench = false # This option is required for Benchmark CI
76
77[[bench]]
78name = "zerovec"
79harness = false
80
81[[bench]]
82name = "zerovec_serde"
83harness = false
84required-features = ["serde"]
85
86[[bench]]
87name = "vzv"
88harness = false
89
90[[bench]]
91name = "zerovec_iai"
92harness = false
93
94[[bench]]
95name = "zeromap"
96harness = false
97required-features = ["serde", "hashmap", "derive"]
98
99[[example]]
100name = "zv_serde"
101required-features = ["serde"]
102