# 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 = "API for formatting date and time to user readable textual representation" authors.workspace = true categories.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 } either = { 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, features = ["macros"] } icu_timezone = { workspace = true } smallvec = { workspace = true } tinystr = { workspace = true, features = ["alloc", "zerovec"] } potential_utf = { workspace = true, features = ["zerovec"] } writeable = { workspace = true } zerovec = { workspace = true, features = ["yoke"] } serde = { workspace = true, features = ["derive", "alloc"], optional = true } databake = { workspace = true, features = ["derive"], optional = true} icu_datetime_data = { workspace = true, optional = true } # Experimental litemap = { workspace = true, optional = true } [dev-dependencies] icu = { path = "../../components/icu", default-features = false } icu_benchmark_macros = { path = "../../tools/benchmark/macros" } icu_calendar = { path = "../calendar", features = ["ixdtf"] } icu_provider_adapters = { path = "../../provider/adapters" } icu_provider_blob = { path = "../../provider/blob" } icu_timezone = { path = "../timezone", features = ["ixdtf"] } litemap = { path = "../../utils/litemap" } 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"] std = [ "icu_calendar/std", "icu_decimal/std", "icu_locale_core/std", "icu_plurals/std", "icu_provider/std", "icu_timezone/std", ] serde = [ "dep:serde", "icu_calendar/serde", "icu_decimal/serde", "icu_pattern/serde", "icu_plurals/serde", "icu_provider/serde", "icu_timezone/serde", "litemap?/serde", "smallvec/serde", "tinystr/serde", "potential_utf/serde", "zerovec/serde", ] datagen = [ "dep:databake", "dep:litemap", "icu_calendar/datagen", "icu_pattern/databake", "icu_plurals/datagen", "icu_timezone/datagen", "serde", "std", ] logging = ["icu_calendar/logging"] experimental = ["dep:litemap"] bench = ["serde", "datagen"] compiled_data = ["dep:icu_datetime_data", "icu_calendar/compiled_data", "icu_decimal/compiled_data", "icu_plurals/compiled_data", "icu_timezone/compiled_data"] [lib] bench = false # This option is required for Benchmark CI [package.metadata.cargo-all-features] skip_optional_dependencies = true # Bench feature gets tested separately and is only relevant for CI denylist = ["bench"] [lints.rust] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(icu4x_run_size_tests)'] } [[bench]] name = "datetime" harness = false required-features = ["compiled_data", "serde", "experimental"] [[bench]] name = "pattern" harness = false required-features = ["bench", "serde", "experimental"] [[test]] name = "datetime" required-features = ["experimental", "compiled_data", "serde"] [[test]] name = "resolved_components" required-features = ["experimental", "compiled_data"] [[test]] name = "simple_test" required-features = ["compiled_data"] [[test]] name = "skeleton_serialization" required-features = ["experimental"] [[example]] name = "work_log" required-features = ["compiled_data"]