| 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 = "icu_provider" |
| 7 |
description = "Trait and struct definitions for the ICU data provider" |
| 8 |
|
| 9 |
authors.workspace = true |
| 10 |
categories.workspace = true |
| 11 |
edition.workspace = true |
| 12 |
homepage.workspace = true |
| 13 |
include.workspace = true |
| 14 |
license.workspace = true |
| 15 |
repository.workspace = true |
| 16 |
rust-version.workspace = true |
| 17 |
version.workspace = true |
| 18 |
|
| 19 |
[package.metadata.docs.rs] |
| 20 |
all-features = true |
| 21 |
|
| 22 |
[dependencies] |
| 23 |
displaydoc = { workspace = true } |
| 24 |
icu_locale_core = { workspace = true } |
| 25 |
stable_deref_trait = { workspace = true, optional = true } |
| 26 |
writeable = { workspace = true, optional = true } |
| 27 |
yoke = { workspace = true, features = ["derive"] } |
| 28 |
zerofrom = { workspace = true, features = ["derive"] } |
| 29 |
zerovec = { workspace = true, features = ["derive"]} |
| 30 |
|
| 31 |
# baked |
| 32 |
zerotrie = { workspace = true, optional = true } |
| 33 |
|
| 34 |
# log |
| 35 |
log = { workspace = true, optional = true } |
| 36 |
|
| 37 |
# serde |
| 38 |
bincode = { workspace = true, optional = true } |
| 39 |
postcard = { workspace = true, optional = true } |
| 40 |
serde = { workspace = true, features = ["derive"], optional = true } |
| 41 |
serde_json = { workspace = true, optional = true } |
| 42 |
|
| 43 |
# export |
| 44 |
erased-serde = { workspace = true, optional = true } |
| 45 |
databake = { workspace = true, optional = true, features = ["derive"] } |
| 46 |
|
| 47 |
[dev-dependencies] |
| 48 |
serde_json = { workspace = true } |
| 49 |
icu = { path = "../../components/icu", default-features = false } |
| 50 |
icu_locale = { path = "../../components/locale" } |
| 51 |
icu_provider_adapters = { path = "../adapters", default-features = false } |
| 52 |
|
| 53 |
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies] |
| 54 |
criterion = { workspace = true } |
| 55 |
|
| 56 |
[features] |
| 57 |
std = ["alloc"] |
| 58 |
alloc = ["icu_locale_core/alloc", "serde?/alloc", "yoke/alloc", "zerofrom/alloc", "zerovec/alloc", "zerotrie?/alloc", "dep:stable_deref_trait", "dep:writeable"] |
| 59 |
sync = [] |
| 60 |
# Enable logging of additional context of data errors |
| 61 |
logging = ["dep:log"] |
| 62 |
|
| 63 |
# Enable BufferProvider and other deserialization infrastructure |
| 64 |
serde = ["dep:serde", "yoke/serde"] |
| 65 |
|
| 66 |
# Features for specific serde formats |
| 67 |
deserialize_json = ["serde", "dep:serde_json"] |
| 68 |
deserialize_bincode_1 = ["serde", "dep:bincode", "std"] |
| 69 |
deserialize_postcard_1 = ["serde", "dep:postcard"] |
| 70 |
|
| 71 |
# Dependencies for baked provider scaffolding |
| 72 |
baked = ["dep:zerotrie", "dep:writeable"] |
| 73 |
|
| 74 |
# Dependencies for running data generation |
| 75 |
export = ["serde", "dep:erased-serde", "dep:databake", "std", "sync", "dep:postcard", "zerovec/databake"] |
| 76 |
|
| 77 |
# added by accident |
| 78 |
zerotrie = [] |
| 79 |
|
| 80 |
[package.metadata.cargo-all-features] |
| 81 |
denylist = ["macros"] |
| 82 |
# We have tons of features here, limit the amount of tests we run |
| 83 |
max_combination_size = 3 |
| 84 |
|
| 85 |
[lib] |
| 86 |
bench = false # This option is required for Benchmark CI |
| 87 |
|
| 88 |
[[bench]] |
| 89 |
name = "data_locale_bench" |
| 90 |
harness = false |