| 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] |
| 6 | name = "zerovec" |
| 7 | description = "Zero-copy vector backed by a byte array" |
| 8 | version = "0.10.4" |
| 9 | categories = ["rust-patterns" , "memory-management" , "caching" , "no-std" , "data-structures" ] |
| 10 | keywords = ["zerocopy" , "serialization" , "zero-copy" , "serde" ] |
| 11 | |
| 12 | authors.workspace = true |
| 13 | edition.workspace = true |
| 14 | include.workspace = true |
| 15 | license.workspace = true |
| 16 | repository.workspace = true |
| 17 | rust-version.workspace = true |
| 18 | |
| 19 | [package.metadata.workspaces] |
| 20 | independent = true |
| 21 | |
| 22 | [package.metadata.docs.rs] |
| 23 | all-features = true |
| 24 | |
| 25 | [dependencies] |
| 26 | zerofrom = { workspace = true } |
| 27 | |
| 28 | zerovec-derive = { workspace = true, optional = true} |
| 29 | |
| 30 | databake = { workspace = true, features = ["derive" ], optional = true } |
| 31 | serde = { 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. |
| 38 | yoke = { version = ">=0.6.0, <0.8.0" , path = "../yoke" , optional = true } |
| 39 | twox-hash = { workspace = true, optional = true } |
| 40 | |
| 41 | [dev-dependencies] |
| 42 | bincode = { workspace = true } |
| 43 | getrandom = { workspace = true, features = ["js" ] } |
| 44 | iai = { workspace = true } |
| 45 | icu_benchmark_macros = { path = "../../tools/benchmark/macros" } |
| 46 | postcard = { workspace = true, features = ["use-std" ] } |
| 47 | rand = { workspace = true } |
| 48 | rand_distr = { workspace = true } |
| 49 | rand_pcg = { workspace = true } |
| 50 | rmp-serde = { workspace = true } |
| 51 | serde = { workspace = true, features = ["derive" ] } |
| 52 | serde_json = { workspace = true } |
| 53 | yoke = { path = "../../utils/yoke" , features = ["derive" ] } |
| 54 | zerofrom = { path = "../../utils/zerofrom" , features = ["derive" ] } |
| 55 | |
| 56 | [target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies] |
| 57 | criterion = { workspace = true } |
| 58 | |
| 59 | [features] |
| 60 | std = [] |
| 61 | derive = ["dep:zerovec-derive" ] |
| 62 | hashmap = ["dep:twox-hash" ] |
| 63 | bench = ["serde" , "databake" ] |
| 64 | yoke = ["dep:yoke" ] |
| 65 | serde = ["dep:serde" ] |
| 66 | databake = ["dep:databake" ] |
| 67 | |
| 68 | [package.metadata.cargo-all-features] |
| 69 | # Bench feature gets tested separately and is only relevant for CI |
| 70 | denylist = ["bench" ] |
| 71 | # We have tons of features here, limit the amount of tests we run |
| 72 | max_combination_size = 3 |
| 73 | |
| 74 | [lib] |
| 75 | bench = false # This option is required for Benchmark CI |
| 76 | |
| 77 | [[bench]] |
| 78 | name = "zerovec" |
| 79 | harness = false |
| 80 | |
| 81 | [[bench]] |
| 82 | name = "zerovec_serde" |
| 83 | harness = false |
| 84 | required-features = ["serde" ] |
| 85 | |
| 86 | [[bench]] |
| 87 | name = "vzv" |
| 88 | harness = false |
| 89 | |
| 90 | [[bench]] |
| 91 | name = "zerovec_iai" |
| 92 | harness = false |
| 93 | |
| 94 | [[bench]] |
| 95 | name = "zeromap" |
| 96 | harness = false |
| 97 | required-features = ["serde" , "hashmap" , "derive" ] |
| 98 | |
| 99 | [[example]] |
| 100 | name = "zv_serde" |
| 101 | required-features = ["serde" ] |
| 102 | |