blob: 60f0785cf8126a8b8a29e288023a2310e588dc48 [file] [edit]
# 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 ).
[package]
name = "icu_datetime"
description = "Human-readable formatting of dates, times, and time zones in hundreds of locales"
categories.workspace = true
keywords = ["unicode", "formatting", "date", "time"]
authors.workspace = true
edition.workspace = true
homepage.workspace = true
include.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
version.workspace = true
[package.metadata.docs.rs]
all-features = true
[dependencies]
displaydoc = { workspace = true }
fixed_decimal = { workspace = true }
icu_calendar = { workspace = true }
icu_decimal = { workspace = true }
icu_locale_core = { workspace = true }
icu_pattern = { workspace = true, features = ["zerovec", "alloc"] }
icu_plurals = { workspace = true }
icu_provider = { workspace = true }
icu_time = { workspace = true, features = ["alloc"] }
tinystr = { workspace = true, features = ["alloc", "zerovec"] }
potential_utf = { workspace = true, features = ["alloc", "zerovec"] }
writeable = { workspace = true }
zerovec = { workspace = true, features = ["alloc", "yoke"] }
serde = { workspace = true, features = ["derive", "alloc"], optional = true }
zerotrie = { workspace = true, features = ["alloc"], optional = true }
databake = { workspace = true, features = ["derive"], optional = true}
smallvec = { workspace = true, optional = true }
jiff = { workspace = true, optional = true }
chrono = { workspace = true, optional = true }
time = { workspace = true, optional = true }
icu_datetime_data = { workspace = true, optional = true }
icu_locale_fallback = { workspace = true, optional = true }
[dev-dependencies]
calendrical_calculations = { workspace = true }
icu = { path = "../../components/icu", default-features = false }
icu_calendar = { path = "../calendar", features = ["ixdtf", "unstable"] }
icu_provider_adapters = { path = "../../provider/adapters" }
icu_provider_blob = { path = "../../provider/blob", features = ["alloc"] }
icu_time = { path = "../time", features = ["ixdtf", "alloc"] }
ureq = { workspace = true }
chrono-tz = { workspace = true }
jiff = { workspace = true, features = ["std", "tzdb-bundle-always"] }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
bincode = { workspace = true }
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
criterion = { workspace = true }
[features]
default = ["compiled_data", "ixdtf"]
serde = [
"dep:serde",
"icu_calendar/serde",
"icu_decimal/serde",
"icu_pattern/serde",
"icu_plurals/serde",
"icu_provider/alloc",
"icu_provider/serde",
"icu_time/serde",
"smallvec?/serde",
"tinystr/serde",
"potential_utf/serde",
"zerovec/serde",
"dep:zerotrie",
]
datagen = [
"dep:databake",
"dep:smallvec",
"icu_calendar/datagen",
"icu_pattern/databake",
"icu_plurals/datagen",
"icu_time/datagen",
"icu_provider/export",
"serde",
]
logging = ["icu_calendar/logging"]
unstable = ["icu_time/unstable"]
compiled_data = ["dep:icu_datetime_data", "icu_calendar/compiled_data", "icu_decimal/compiled_data", "icu_plurals/compiled_data", "icu_time/compiled_data", "dep:icu_locale_fallback", "icu_locale_fallback?/compiled_data", "icu_provider/baked"]
ixdtf = ["icu_time/ixdtf", "icu_calendar/ixdtf"]
unstable_jiff_0_2 = ["dep:jiff", "icu_time/unstable_jiff_0_2", "icu_calendar/unstable_jiff_0_2"]
unstable_chrono_0_4 = ["dep:chrono", "icu_time/unstable_chrono_0_4", "icu_calendar/unstable_chrono_0_4"]
unstable_time_0_3 = ["dep:time", "icu_time/unstable_time_0_3", "icu_calendar/unstable_time_0_3"]
[lib]
bench = false # This option is required for Benchmark CI
[package.metadata.cargo-all-features]
skip_optional_dependencies = true
max_combination_size = 3
[[bench]]
name = "datetime"
harness = false
required-features = ["compiled_data", "serde", "unstable"]
[[bench]]
name = "pattern"
harness = false
required-features = ["serde", "unstable"]
[[test]]
name = "datetime"
required-features = ["unstable", "compiled_data", "serde"]
[[test]]
name = "range"
required-features = ["compiled_data", "unstable"]
[[test]]
name = "resolved_components"
required-features = ["unstable", "compiled_data"]
[[test]]
name = "simple_test"
required-features = ["compiled_data"]
[[test]]
name = "skeleton_serialization"
required-features = ["unstable"]
[package.metadata.cargo-semver-checks.lints]
workspace = true
[lints]
workspace = true