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_locid" |
7 | description = "API for managing Unicode Language and Locale Identifiers" |
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 | litemap = { workspace = true, features = ["alloc" ] } |
25 | tinystr = { workspace = true, features = ["alloc" ] } |
26 | writeable = { workspace = true } |
27 | |
28 | databake = { workspace = true, features = ["derive" ], optional = true} |
29 | serde = { workspace = true, features = ["alloc" , "derive" ], optional = true } |
30 | zerovec = { workspace = true, optional = true } |
31 | |
32 | [dev-dependencies] |
33 | iai = { workspace = true } |
34 | icu = { path = "../../components/icu" , default-features = false } |
35 | icu_benchmark_macros = { path = "../../tools/benchmark/macros" } |
36 | litemap = { path = "../../utils/litemap" , features = ["testing" ]} |
37 | postcard = { workspace = true, features = ["use-std" ] } |
38 | serde = { workspace = true, features = ["derive" ] } |
39 | serde_json = { workspace = true } |
40 | |
41 | |
42 | [target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies] |
43 | criterion = { workspace = true } |
44 | |
45 | [features] |
46 | std = [] |
47 | databake = ["dep:databake" ] |
48 | serde = ["dep:serde" , "tinystr/serde" ] |
49 | zerovec = ["dep:zerovec" ] |
50 | bench = ["serde" ] |
51 | |
52 | [lib] |
53 | bench = false # This option is required for Benchmark CI |
54 | |
55 | [package.metadata.cargo-all-features] |
56 | # Bench feature gets tested separately and is only relevant for CI |
57 | denylist = ["bench" ] |
58 | |
59 | [[bench]] |
60 | name = "subtags" |
61 | harness = false |
62 | required-features = ["bench" ] |
63 | |
64 | [[bench]] |
65 | name = "langid" |
66 | harness = false |
67 | |
68 | [[bench]] |
69 | name = "locale" |
70 | harness = false |
71 | |
72 | [[bench]] |
73 | name = "iai_langid" |
74 | harness = false |
75 | required-features = ["bench" ] |
76 | |
77 | [[example]] |
78 | name = "filter_langids" |
79 | test = true |
80 | |
81 | [[example]] |
82 | name = "syntatically_canonicalize_locales" |
83 | test = true |
84 | |