# 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_capi" description = "C interface to ICU4X" license = "Unicode-3.0" include = [ "bindings/**/*", "!bindings/dart/**/*", # not yet stable "src/**/*", "tests/**/*", "Cargo.toml", "LICENSE", "README.md" ] authors.workspace = true categories.workspace = true edition.workspace = true homepage.workspace = true repository.workspace = true rust-version.workspace = true version.workspace = true [package.metadata.docs.rs] all-features = true [package.metadata.cargo-all-features] # Bench feature gets tested separately and is only relevant for CI. # logging enables a feature of a dependency that has no externally visible API changes denylist = ["bench"] # This has a lot of features, run a reduced test that is likely to catch 99% of bugs max_combination_size = 2 [features] default = ["compiled_data", "default_components", "logging", "simple_logger", "std"] any_provider = [] buffer_provider = [ "dep:icu_provider_blob", "dep:serde", "icu_calendar?/serde", "icu_casemap?/serde", "icu_collator?/serde", "icu_datetime?/serde", "icu_decimal?/serde", "icu_list?/serde", "icu_locale?/serde", "icu_locale_core/serde", "icu_normalizer?/serde", "icu_plurals?/serde", "icu_properties?/serde", "icu_provider/serde", "icu_provider_adapters/serde", "icu_segmenter?/serde", "icu_timezone?/serde", "icu_experimental?/serde", ] provider_fs = ["dep:icu_provider_fs", "buffer_provider", "std"] logging = ["icu_provider/logging", "dep:log", "diplomat-runtime/log", "std"] simple_logger = ["dep:simple_logger", "logging"] # Components default_components = [ "calendar", "casemap", "collator", "datetime", "decimal", "list", "locale", "normalizer", "plurals", "properties", "segmenter", "timezone" ] calendar = ["dep:icu_calendar"] casemap = ["dep:icu_casemap"] collator = ["dep:icu_collator"] # collections = ["dep:icu_collections"] # Not useful on its own: use properties datetime = ["dep:icu_datetime", "dep:icu_calendar", "dep:icu_timezone", "dep:icu_decimal", "dep:icu_plurals", "icu_datetime?/experimental"] decimal = ["dep:icu_decimal", "dep:fixed_decimal"] experimental = ["dep:icu_experimental"] list = ["dep:icu_list"] locale = ["dep:icu_locale"] normalizer = ["dep:icu_normalizer"] plurals = ["dep:icu_plurals", "dep:fixed_decimal"] properties = ["dep:icu_properties", "dep:icu_collections", "dep:unicode-bidi"] segmenter = ["dep:icu_segmenter"] timezone = ["dep:icu_timezone", "dep:icu_calendar"] compiled_data = [ "icu_calendar?/compiled_data", "icu_casemap?/compiled_data", "icu_collator?/compiled_data", "icu_datetime?/compiled_data", "icu_decimal?/compiled_data", "icu_list?/compiled_data", "icu_locale?/compiled_data", "icu_normalizer?/compiled_data", "icu_plurals?/compiled_data", "icu_properties?/compiled_data", "icu_segmenter?/compiled_data", "icu_timezone?/compiled_data", "icu_experimental?/compiled_data", ] std = [] # Adds a looping panic handler (useful for no_std targets) looping_panic_handler = [] # Uses malloc as the global allocator (useful for no_std targets) libc_alloc = ["dep:libc_alloc"] [dependencies] # Mandatory ICU4X components and utils icu_locale_core = { workspace = true } icu_provider = { workspace = true } icu_provider_adapters = { workspace = true } tinystr = { workspace = true } potential_utf = { workspace = true, features = ["writeable"]} writeable = { workspace = true } # Diplomat diplomat = { workspace = true } diplomat-runtime = { workspace = true } # Optional ICU4X components and their dependent utils fixed_decimal = { workspace = true, features = ["ryu"] , optional = true } icu_calendar = { workspace = true, features = ["ixdtf"], optional = true } icu_casemap = { workspace = true, optional = true } icu_collator = { workspace = true, optional = true } icu_collections = { workspace = true, optional = true } icu_datetime = { workspace = true, optional = true } icu_decimal = { workspace = true, optional = true } icu_list = { workspace = true, optional = true } icu_locale = { workspace = true, optional = true } icu_normalizer = { workspace = true, optional = true } icu_plurals = { workspace = true, optional = true } icu_properties = { workspace = true, features = ["unicode_bidi"], optional = true } icu_segmenter = { workspace = true, features = ["auto"], optional = true } icu_timezone = { workspace = true, optional = true } icu_experimental = { workspace = true, optional = true } # Optional ICU4X features (not components) icu_provider_blob = { workspace = true, optional = true } serde = { workspace = true, optional = true } unicode-bidi = { workspace = true, optional = true } log = { workspace = true, optional = true } zerovec = { workspace = true } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] # Logging uses diplomat_runtime bindings in wasm, we only need this for native simple_logger = { workspace = true, optional = true } libc_alloc = { workspace = true, features = ["global"], optional = true } [target.'cfg(not(any(target_arch = "wasm32", target_os = "none")))'.dependencies] icu_provider_fs = { workspace = true, optional = true }