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_transform" |
7 | description = "API for Unicode Language and Locale Identifiers canonicalization" |
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.cargo-all-features] |
20 | skip_optional_dependencies = true |
21 | # Bench feature gets tested separately and is only relevant for CI |
22 | denylist = ["bench" ] |
23 | |
24 | [package.metadata.docs.rs] |
25 | all-features = true |
26 | |
27 | [dependencies] |
28 | icu_locid = { workspace = true, features = ["zerovec" ] } |
29 | icu_provider = { workspace = true, features = ["macros" ] } |
30 | serde = { workspace = true, features = ["derive" , "alloc" ], optional = true } |
31 | tinystr = { workspace = true, features = ["alloc" , "zerovec" ] } |
32 | zerovec = { workspace = true, features = ["yoke" ] } |
33 | databake = { workspace = true, optional = true, features = ["derive" ] } |
34 | displaydoc = { workspace = true } |
35 | |
36 | icu_locid_transform_data = { workspace = true, optional = true } |
37 | |
38 | [dev-dependencies] |
39 | serde = { workspace = true, features = ["derive" ] } |
40 | serde_json = { workspace = true } |
41 | icu = { path = "../../components/icu" , default-features = false } |
42 | writeable = { path = "../../utils/writeable" } |
43 | |
44 | [target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies] |
45 | criterion = { workspace = true } |
46 | |
47 | [lib] |
48 | bench = false # This option is required for Benchmark CI |
49 | |
50 | [features] |
51 | default = ["compiled_data" ] |
52 | std = [] |
53 | bench = ["serde" ] |
54 | serde = ["dep:serde" , "icu_locid/serde" , "tinystr/serde" , "zerovec/serde" , "icu_provider/serde" ] |
55 | datagen = ["serde" , "dep:databake" , "zerovec/databake" , "icu_locid/databake" , "tinystr/databake" ] |
56 | compiled_data = ["dep:icu_locid_transform_data" ] |
57 | |
58 | [[bench]] |
59 | name = "locale_canonicalizer" |
60 | harness = false |
61 | |
62 | [[test]] |
63 | name = "locale_canonicalizer" |
64 | required-features = ["serde" ] |
65 | |