-
Notifications
You must be signed in to change notification settings - Fork 263
Expand file tree
/
Copy pathCargo.toml
More file actions
401 lines (369 loc) · 16.2 KB
/
Cargo.toml
File metadata and controls
401 lines (369 loc) · 16.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
# This file is part of ICU4X. For terms of use, please see the file
# called LICENSE at the top level of the ICU4X source tree
# (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
[workspace]
resolver = "2"
members = [
# KEEP IN SYNC WITH workspace.dependencies and examples/.cargo/config.toml
# ICU4X core
"components/locale_core",
"provider/core",
# Components
"components/calendar",
"components/casemap",
"components/collator",
"components/collections",
"components/collections/codepointtrie_builder",
"components/datetime",
"components/decimal",
"components/experimental",
"components/icu",
"components/list",
"components/locale",
"components/normalizer",
"components/pattern",
"components/plurals",
"components/properties",
"components/segmenter",
"components/time",
# FFI
"ffi/capi",
"ffi/ecma402",
"ffi/freertos",
# Provider
"provider/adapters",
"provider/baked",
"provider/source",
"provider/blob",
"provider/export",
"provider/fs",
"provider/registry",
"provider/icu4x-datagen",
# Baked data
"provider/data/calendar",
"provider/data/casemap",
"provider/data/collator",
"provider/data/datetime",
"provider/data/decimal",
"provider/data/list",
"provider/data/locale",
"provider/data/normalizer",
"provider/data/plurals",
"provider/data/properties",
"provider/data/segmenter",
"provider/data/time",
# Utils
"utils/bies",
"utils/calendrical_calculations",
"utils/crlify",
"utils/databake",
"utils/databake/derive",
"utils/fixed_decimal",
"utils/ixdtf",
"utils/litemap",
"utils/resb",
"utils/tinystr",
"utils/tzif",
"utils/potential_utf",
"utils/writeable",
"utils/yoke",
"utils/yoke/derive",
"utils/zerofrom",
"utils/zerofrom/derive",
"utils/zerotrie",
"utils/zerovec",
"utils/zerovec/derive",
"utils/zoneinfo64",
# Tools
"tools/benchmark/binsize",
"tools/benchmark/macros",
"tools/benchmark/memory",
"tools/make/bakeddata",
"tools/make/codegen",
"tools/make/depcheck",
"tools/make/diplomat-coverage",
"tools/make/diplomat-gen",
"tools/make/download-repo-sources",
"tools/md-tests",
"tools/noalloctest",
]
# Note: Workspaces in subdirectories, such as components/collator/fuzz, are
# implicitly excluded from the main workspace.
exclude = [
# host_info requires a custom ci job to avoid having to pull its optional dependencies
"utils/host_info",
# Examples are tested outside the workspace to simulate external users
"examples",
# Don't publish the graveyard
"tools/graveyard"
]
[workspace.package]
version = "2.1.1"
rust-version = "1.86"
authors = ["The ICU4X Project Developers"]
edition = "2021"
repository = "https://github.com/unicode-org/icu4x"
homepage = "https://icu4x.unicode.org"
license = "Unicode-3.0"
categories = ["internationalization"]
include = [
"data/**/*",
"src/**/*",
"examples/**/*",
"benches/**/*",
"tests/**/*",
"Cargo.toml",
"LICENSE",
"README.md",
"build.rs",
]
[workspace.dependencies]
# KEEP IN SYNC WITH workspace.members and examples/.cargo/config.toml
# ICU4X core
# These use non-tilde deps, see https://github.com/unicode-org/icu4x/issues/4343
icu_locale_core = { version = "2.1.1", path = "components/locale_core", default-features = false }
icu_provider = { version = "2.1.1", path = "provider/core", default-features = false }
icu_pattern = { version = "0.4.1", path = "components/pattern", default-features = false }
# Components
icu = { version = "~2.1.1", path = "components/icu", default-features = false }
icu_calendar = { version = "~2.1.1", path = "components/calendar", default-features = false }
icu_casemap = { version = "~2.1.1", path = "components/casemap", default-features = false }
icu_collator = { version = "~2.1.1", path = "components/collator", default-features = false }
icu_collections = { version = "~2.1.1", path = "components/collections", default-features = false }
icu_codepointtrie_builder = { version = "~0.6.0-dev", path = "components/collections/codepointtrie_builder", default-features = false }
icu_datetime = { version = "~2.1.1", path = "components/datetime", default-features = false }
icu_decimal = { version = "~2.1.1", path = "components/decimal", default-features = false }
icu_experimental = { version = "~0.5.0-dev", path = "components/experimental", default-features = false }
icu_list = { version = "~2.1.1", path = "components/list", default-features = false }
icu_locale = { version = "~2.1.1", path = "components/locale", default-features = false }
icu_normalizer = { version = "~2.1.1", path = "components/normalizer", default-features = false }
icu_plurals = { version = "~2.1.1", path = "components/plurals", default-features = false }
icu_properties = { version = "~2.1.1", path = "components/properties", default-features = false }
icu_segmenter = { version = "~2.1.1", path = "components/segmenter", default-features = false }
icu_time = { version = "~2.1.1", path = "components/time", default-features = false }
# FFI
icu_capi = { version = "~2.1.1", path = "ffi/capi", default-features = false }
# icu4x_ecma402 never used as a dep
# icu_freertos never used as a dep
# Provider
icu_provider_export = { version = "~2.1.1", path = "provider/export", default-features = false }
icu_provider_source = { version = "~2.1.1", path = "provider/source", default-features = false }
icu_provider_adapters = { version = "~2.1.1", path = "provider/adapters", default-features = false }
icu_provider_baked = { version = "~2.1.1", path = "provider/baked", default-features = false }
icu_provider_blob = { version = "~2.1.1", path = "provider/blob", default-features = false }
icu_provider_fs = { version = "~2.1.1", path = "provider/fs", default-features = false }
icu_provider_registry = { version = "~2.1.2", path = "provider/registry", default-features = false }
# Baked data
icu_calendar_data = { version = "~2.1.1", path = "provider/data/calendar", default-features = false }
icu_casemap_data = { version = "~2.1.1", path = "provider/data/casemap", default-features = false }
icu_collator_data = { version = "~2.1.1", path = "provider/data/collator", default-features = false }
icu_datetime_data = { version = "~2.1.1", path = "provider/data/datetime", default-features = false }
icu_decimal_data = { version = "~2.1.1", path = "provider/data/decimal", default-features = false }
icu_list_data = { version = "~2.1.1", path = "provider/data/list", default-features = false }
icu_locale_data = { version = "~2.1.1", path = "provider/data/locale", default-features = false }
icu_normalizer_data = { version = "~2.1.1", path = "provider/data/normalizer", default-features = false }
icu_plurals_data = { version = "~2.1.1", path = "provider/data/plurals", default-features = false }
icu_properties_data = { version = "~2.1.2", path = "provider/data/properties", default-features = false }
icu_segmenter_data = { version = "~2.1.1", path = "provider/data/segmenter", default-features = false }
icu_time_data = { version = "~2.1.1", path = "provider/data/time", default-features = false }
icu_experimental_data = { version = "~0.4.0", path = "provider/data/experimental", default-features = false }
# Utils
bies = { version = "0.2.2", path = "utils/bies", default-features = false }
calendrical_calculations = { version = "0.2.3", path = "utils/calendrical_calculations", default-features = false }
crlify = { version = "1.0.4", path = "utils/crlify", default-features = false }
databake = { version = "0.2.0", path = "utils/databake", default-features = false }
databake-derive = { version = "0.2.0", path = "utils/databake/derive", default-features = false }
fixed_decimal = { version = "0.7.0", path = "utils/fixed_decimal", default-features = false }
ixdtf = { version = "0.6.0", path = "utils/ixdtf", default-features = false }
litemap = { version = "0.8.0", path = "utils/litemap", default-features = false }
potential_utf = { version = "0.1.3", path = "utils/potential_utf", default-features = false }
resb = { version = "0.1.0", path = "utils/resb", default-features = false }
tzif = { version = "0.5.0-dev", path = "utils/tzif", default-features = false }
tinystr = { version = "0.8.0", path = "utils/tinystr", default-features = false }
writeable = { version = "0.6.0", path = "utils/writeable", default-features = false }
yoke = { version = "0.8.0", path = "utils/yoke", default-features = false }
yoke-derive = { version = "0.8.0", path = "utils/yoke/derive", default-features = false }
zerofrom = { version = "0.1.3", path = "utils/zerofrom", default-features = false }
zerofrom-derive = { version = "0.1.3", path = "utils/zerofrom/derive", default-features = false }
zerotrie = { version = "0.2.0", path = "utils/zerotrie", default-features = false }
zerovec = { version = "0.11.3", path = "utils/zerovec", default-features = false }
zerovec-derive = { version = "0.11.1", path = "utils/zerovec/derive", default-features = false }
zoneinfo64 = { version = "0.2.0", path = "utils/zoneinfo64", default-features = false }
# Tools
icu_benchmark_macros = { path = "tools/benchmark/macros" }
# bench-binsize never used as a dep
# bench-memory never used as a dep
# make/* never used as a dep
# The version here can either be a `version = ".."` spec or `git = "https://github.com/rust-diplomat/diplomat", rev = ".."`
# Diplomat must be published preceding a new ICU4X release but may use git versions in between
diplomat = { git = "https://github.com/rust-diplomat/diplomat", rev = "f71e1b6c562237f9e6059dbf54bfce626936dd35", default-features = false }
diplomat-runtime = { git = "https://github.com/rust-diplomat/diplomat", rev = "f71e1b6c562237f9e6059dbf54bfce626936dd35", default-features = false }
diplomat_core = { git = "https://github.com/rust-diplomat/diplomat", rev = "f71e1b6c562237f9e6059dbf54bfce626936dd35", default-features = false }
diplomat-tool = { git = "https://github.com/rust-diplomat/diplomat", rev = "f71e1b6c562237f9e6059dbf54bfce626936dd35" }
# EXTERNAL DEPENDENCIES
#
# Due to semver-related constraints, we generally want to consume crates.io dependencies with
# default features, with some notable exceptions:
#
# 1. Dependencies of core library crates need to be `no_std`
# 2. Some crates have a lot of default features that pull in undesirable transitive deps
#
# We therefore have three groups for our crates.io dependencies.
## External Deps Group 1: Library deps except datagen. No default features.
# Keep in sync with allowlist.rs:
# BASIC_RUNTIME_DEPS
# BASIC_BUILD_DEPS
# EXTRA_SERDE_DEPS
# EXTRA_EXPERIMENTAL_DEPS
# EXTRA_LSTM_DEPS
# EXTRA_RYU_DEPS
# EXTRA_CAPI_DEPS
# EXTRA_BLOB_DEPS
# EXTRA_FS_DEPS
arrayvec = { version = "0.7.2", default-features = false }
core_maths = { version = "0.1.0", default-features = false }
displaydoc = { version = "0.2.3", default-features = false }
either = { version = "1.9.0", default-features = false }
harfbuzz-traits = { version = "0.6.0", default-features = false }
libc_alloc = { version = "1.0.6", default-features = false }
log = { version = "0.4.17", default-features = false }
memchr = { version = "2.6.0", default-features = false }
num-bigint = { version = "0.4.3", default-features = false }
num-rational = { version = "0.4.0", default-features = false }
num-traits = { version = "0.2.0", default-features = false }
postcard = { version = "1.0.3", default-features = false }
regex-automata = { version = "0.4.7", default-features = false }
ryu = { version = "1.0.5", default-features = false }
schemars = { version = "1.0.4", default-features = false }
serde = { version = "1.0.220", default-features = false }
serde_core = { version = "1.0.220", default-features = false }
serde-json-core = { version = "0.6.0", default-features = false }
smallvec = { version = "1.10.0", default-features = false }
stable_deref_trait = { version = "1.2.0", default-features = false }
twox-hash = { version = "2.0.0", default-features = false, features = ["xxhash64"] }
unicode-bidi = { version = "0.3.11", default-features = false }
utf16_iter = { path = "../utf16_iter", default-features = false }
utf8_iter = { path = "../utf8_iter", default-features = false }
write16 = { path = "../write16", default-features = false }
## External Deps Group 2: Heavy Dev and Datagen deps. No default features.
zip = { version = "2", default-features = false }
tar = { version = "0.4.43", default-features = false }
flate2 = { version = "1.0.35", default-features = false }
serde-aux = { version = "4.0.0", default-features = false }
toml = { version = "0.8.0", default-features = false, features = ["parse"] }
## External Deps Group 3: Dev and Datagen deps. Include default features.
arraystring = "0.3.0"
askama = "0.15"
atoi = "2.0.0"
bincode = "1.3.1" # Can be updated to 2.0 after MSRV 1.85
clap = "4.2.0"
combine = "4.3.1"
criterion = "0.5.0"
detone = "1.0.0"
elsa = "1.10.0"
erased-serde = "0.4.0"
eyre = "0.6.0"
getrandom = "0.3"
heck = "0.5"
iai = "0.1.1"
indexmap = "2.0.0"
insta = "1.43.2"
itertools = "0.14.0"
ndarray = "0.16.0"
parse-zoneinfo = "0.5.0"
proc-macro2 = "1.0.61"
quote = "1.0.44"
rand = "0.9"
rand_distr = "0.5"
rand_pcg = "0.9"
rayon = "1.3.0"
regex = "1.12.2"
rkyv = "0.7"
rmp-serde = "1.2.0"
serde_json = "1.0.45"
simple_logger = "5.0.0"
syn = "2.0.21"
synstructure = "0.13.0"
ureq = "3.0.0"
walkdir = "2.3.2"
wasmi = "1.0.8"
wat = "1"
# Size optimized builds
[profile.release-opt-size]
inherits = "release"
lto = true
opt-level = "s"
panic = "abort"
codegen-units = 1
# Builds with debug metadata but not debug assertions
# for testing GIGO code paths
[profile.dev-without-assertions]
inherits = "dev"
debug-assertions = false
# For slow tests
[profile.release-with-assertions]
inherits = "release"
debug-assertions = true
[profile.bench]
lto = true
# Enable debug information specifically for memory profiling.
# https://docs.rs/dhat/0.2.1/dhat/#configuration
[profile.bench-memory]
inherits = "bench"
debug = true
[workspace.lints]
clippy.alloc-instead-of-core = "warn"
clippy.branches-sharing-code = "warn"
clippy.collection_is_never_read = "warn"
clippy.dbg_macro = "warn"
clippy.debug_assert_with_mut_call = "warn"
clippy.doc_markdown = "warn"
clippy.exhaustive_enums = "deny"
clippy.exhaustive_structs = "deny"
clippy.fn_to_numeric_cast_any = "warn"
clippy.infinite_loop = "warn"
clippy.large_stack_arrays = "warn"
clippy.mismatching_type_param_order = "warn"
clippy.missing_fields_in_debug = "warn"
clippy.negative_feature_names = "warn"
clippy.or-fun-call = "warn"
clippy.same_functions_in_if_condition = "warn"
clippy.todo = "warn"
clippy.trivially_copy_pass_by_ref = "deny"
clippy.unnecessary-wraps = "warn"
clippy.wildcard_dependencies = "warn"
rust.missing_debug_implementations = "deny"
rust.trivial_numeric_casts = "deny"
rust.unexpected_cfgs = { level = "warn", check-cfg = [
'cfg(icu4c_enable_renaming)',
'cfg(needs_alloc_error_handler)',
'cfg(icu4x_run_size_tests)',
'cfg(icu4x_unstable_fast_trie_only)',
] }
rust.unused_lifetimes = "warn"
rust.unused_macro_rules = "warn"
rust.unused_qualifications = "warn"
# These lints are currently enabled in the crate roots because of https://github.com/rust-lang/rust-clippy/issues/13981
# clippy.unwrap_used = "warn"
# clippy.expect_used = "warn"
# clippy.panic = "warn"
# clippy.indexing_slicing = "warn"
# This lint is currently enabled in the crate roots because of https://github.com/rust-lang/rust/issues/137561
# rust.missing_docs = "deny"
# We should enable these lints
# clippy.allow_attributes_without_reason = "warn"
# clippy.cargo_common_metadata = "warn"
# clippy.cast_possible_truncation = "warn"
# clippy.default_trait_access = "warn"
# clippy.missing_assert_message = "warn"
# clippy.redundant_feature_names = "warn"
# clippy.use_self = "warn"
# rust.unreachable_pub = "warn"
# rust.unsafe_op_in_unsafe_fn = "forbid"
[workspace.metadata.cargo-semver-checks.lints]
type_method_marked_deprecated.level = "allow" # allow deprecation in patch releases
trait_method_marked_deprecated.level = "allow" # allow deprecation in patch releases
type_marked_deprecated.level = "allow" # allow deprecation in patch releases
struct_field_marked_deprecated = "allow" # allow deprecation in patch releases
type_associated_const_marked_deprecated = "allow" # allow deprecation in patch releases
enum_no_repr_variant_discriminant_changed = "allow" # we don't consider this breaking https://github.com/obi1kenobi/cargo-semver-checks/issues/1376