# This file is part of ICU4X. For terms of use, please see the file # called LICENSE at the top level of the ICU4X source tree # (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). [package] name = "zerovec" description = "Zero-copy vector backed by a byte array" version = "0.10.2" categories = ["rust-patterns", "memory-management", "caching", "no-std", "data-structures"] keywords = ["zerocopy", "serialization", "zero-copy", "serde"] authors.workspace = true edition.workspace = true include.workspace = true license.workspace = true repository.workspace = true rust-version.workspace = true [package.metadata.workspaces] independent = true [package.metadata.docs.rs] all-features = true [dependencies] zerofrom = { workspace = true } zerovec-derive = { workspace = true, optional = true} databake = { workspace = true, features = ["derive"], optional = true } serde = { workspace = true, features = ["alloc"], optional = true } # Special dep for yoke: avoid non-breaking zerovec bumps requiring breaking yoke bumps # Can be reset on next zerovec breaking if necessary # # This effectively stands for the range `~0.6 OR ~0.7`, i.e. it supports all 0.6 versions # and all 0.7 versions, but not further. yoke = { version = ">=0.6.0, <0.8.0", path = "../yoke", optional = true } twox-hash = { workspace = true, optional = true } [dev-dependencies] bincode = { workspace = true } getrandom = { workspace = true, features = ["js"] } iai = { workspace = true } icu_benchmark_macros = { path = "../../tools/benchmark/macros" } postcard = { workspace = true, features = ["use-std"] } rand = { workspace = true } rand_distr = { workspace = true } rand_pcg = { workspace = true } rmp-serde = { workspace = true } serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true } yoke = { path = "../../utils/yoke", features = ["derive"] } zerofrom = { path = "../../utils/zerofrom", features = ["derive"] } [target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies] criterion = { workspace = true } [features] std = [] derive = ["dep:zerovec-derive"] hashmap = ["dep:twox-hash"] bench = ["serde", "databake"] yoke = ["dep:yoke"] serde = ["dep:serde"] databake = ["dep:databake"] [package.metadata.cargo-all-features] # Bench feature gets tested separately and is only relevant for CI denylist = ["bench"] # We have tons of features here, limit the amount of tests we run max_combination_size = 3 [lib] bench = false # This option is required for Benchmark CI [[bench]] name = "zerovec" harness = false [[bench]] name = "zerovec_serde" harness = false required-features = ["serde"] [[bench]] name = "vzv" harness = false [[bench]] name = "zerovec_iai" harness = false [[bench]] name = "zeromap" harness = false required-features = ["serde", "hashmap", "derive"] [[example]] name = "zv_serde" required-features = ["serde"]