icu_decimal 1.5.0

API for formatting basic decimal numbers in a locale-sensitive way
Documentation
# 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_decimal"
description = "API for formatting basic decimal numbers in a locale-sensitive way"

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 }
fixed_decimal = { workspace = true }
icu_provider = { workspace = true, features = ["macros"] }
writeable = { workspace = true }

databake = { workspace = true, features = ["derive"], optional = true}
serde = { workspace = true, features = ["derive", "alloc"], optional = true }

icu_decimal_data = { workspace = true, optional = true }
icu_locid_transform = { workspace = true, optional = true, features = ["compiled_data"] }

[dev-dependencies]
icu = { path = "../../components/icu", default-features = false }
icu_benchmark_macros = { path = "../../tools/benchmark/macros" }
icu_locid = { path = "../../components/locid" }
icu_provider_adapters = { path = "../../provider/adapters" }
rand = { workspace = true }
rand_pcg = { workspace = true }
rand_distr = { workspace = true }
getrandom = { workspace = true, features = ["js"] }

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
criterion = { workspace = true }

[features]
default = ["compiled_data"]
std = ["fixed_decimal/std", "icu_locid/std", "icu_provider/std"]
serde = ["dep:serde", "icu_provider/serde"]
datagen = ["serde", "dep:databake"]
bench = ["serde"]
compiled_data = ["dep:icu_decimal_data", "dep:icu_locid_transform"]

[package.metadata.cargo-all-features]
# Bench feature gets tested separately and is only relevant for CI
denylist = ["bench"]

[[bench]]
name = "fixed_decimal_format"
harness = false

[[example]]
name = "code_line_diff"
required-features = ["serde"]