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