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