# 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_plurals" description = "Unicode Plural Rules categorizer for numeric input" 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"] } zerovec = { workspace = true, features = ["yoke"] } databake = { workspace = true, features = ["derive"], optional = true} serde = { workspace = true, features = ["derive", "alloc"], optional = true } icu_plurals_data = { workspace = true, optional = true } [dev-dependencies] icu = { path = "../../components/icu", default-features = false } icu_benchmark_macros = { path = "../../tools/benchmark/macros" } icu_locale_core = { path = "../../components/locale_core" } serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true } postcard = { workspace = true, features = ["alloc"] } [target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies] criterion = { workspace = true } [features] default = ["compiled_data"] std = ["fixed_decimal/std", "icu_locale_core/std", "icu_provider/std"] serde = ["dep:serde", "zerovec/serde", "icu_locale_core/serde", "icu_provider/serde"] datagen = ["std", "serde", "zerovec/databake", "dep:databake"] experimental = [] bench = ["serde", "datagen"] compiled_data = ["dep:icu_plurals_data"] [lib] bench = false # This option is required for Benchmark CI [package.metadata.cargo-all-features] # Bench feature gets tested separately and is only relevant for CI denylist = ["bench"] [[bench]] name = "operands" harness = false [[bench]] name = "parser" harness = false required-features = ["serde"] [[bench]] name = "pluralrules" harness = false required-features = ["serde"] [[test]] name = "plurals" required-features = ["serde"] [[test]] name = "operands" required-features = ["serde", "std", "experimental"] [[test]] name = "rules" required-features = ["experimental"] [[example]] name = "unread_emails" required-features = ["serde"] [[example]] name = "elevator_floors" required-features = ["serde"]