[package]
edition = "2024"
rust-version = "1.88"
name = "icu_capi"
version = "2.3.0"
authors = ["The ICU4X Project Developers"]
build = false
include = [
"bindings/c/**/*",
"bindings/cpp/**/*",
"bindings/js/**/*",
"src/**/*",
"tests/**/*",
"Cargo.toml",
"LICENSE",
"README.md",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "C interface to ICU4X"
homepage = "https://icu4x.unicode.org"
readme = "README.md"
keywords = [
"ffi",
"bindings",
"c-api",
]
categories = [
"internationalization",
"localization",
"external-ffi-bindings",
"no-std",
"embedded",
]
license = "Unicode-3.0"
repository = "https://github.com/unicode-org/icu4x"
resolver = "2"
[package.metadata.docs.rs]
all-features = true
[package.metadata.cargo-all-features]
denylist = [
"looping_panic_handler",
"libc_alloc",
]
max_combination_size = 2
[package.metadata.cargo-semver-checks.lints]
workspace = true
[features]
any_provider = []
buffer_provider = [
"dep:icu_provider_blob",
"icu_calendar?/serde",
"icu_casemap?/serde",
"icu_collator?/serde",
"icu_datetime?/serde",
"icu_decimal?/serde",
"icu_list?/serde",
"icu_locale?/serde",
"icu_locale_fallback?/serde",
"icu_locale_core/serde",
"icu_normalizer?/serde",
"icu_plurals?/serde",
"icu_properties?/serde",
"icu_provider/serde",
"icu_segmenter?/serde",
"icu_time?/serde",
"icu_experimental?/serde",
]
calendar = [
"dep:icu_calendar",
"dep:icu_time",
"dep:tinystr",
]
casemap = ["dep:icu_casemap"]
collator = ["dep:icu_collator"]
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_locale_fallback?/compiled_data",
"icu_normalizer?/compiled_data",
"icu_plurals?/compiled_data",
"icu_properties?/compiled_data",
"icu_segmenter?/compiled_data",
"icu_time?/compiled_data",
"icu_experimental?/compiled_data",
]
datetime = [
"calendar",
"dep:icu_datetime",
]
decimal = [
"dep:icu_decimal",
"dep:fixed_decimal",
"dep:zerovec",
]
default = [
"compiled_data",
"default_components",
"logging",
"simple_logger",
"std",
]
default_components = [
"calendar",
"casemap",
"collator",
"datetime",
"decimal",
"list",
"locale",
"normalizer",
"plurals",
"properties",
"segmenter",
"timezone",
]
experimental = ["dep:icu_experimental"]
libc_alloc = ["dep:libc_alloc"]
list = [
"dep:icu_list",
"dep:potential_utf",
]
locale = [
"dep:icu_locale",
"locale_fallback",
]
locale_fallback = ["dep:icu_locale_fallback"]
logging = [
"icu_provider/logging",
"diplomat-runtime/log",
"std",
]
looping_panic_handler = []
normalizer = [
"dep:icu_normalizer",
"icu_normalizer?/utf8_iter",
"icu_normalizer?/utf16_iter",
]
plurals = [
"dep:icu_plurals",
"dep:fixed_decimal",
]
properties = [
"dep:icu_properties",
"dep:icu_collections",
"dep:unicode-bidi",
]
provider_fs = [
"dep:icu_provider_fs",
"buffer_provider",
"std",
]
segmenter = ["dep:icu_segmenter"]
simple_logger = [
"dep:simple_logger",
"logging",
]
std = []
timezone = ["calendar"]
unstable = [
"icu_calendar?/unstable",
"icu_datetime?/unstable",
"icu_locale?/unstable",
"icu_plurals?/unstable",
"icu_time?/unstable",
]
[lib]
name = "icu_capi"
path = "src/lib.rs"
[dependencies.diplomat]
version = "0.16.0"
default-features = false
[dependencies.diplomat-runtime]
version = ">= 0.15.2, < 0.17.0"
default-features = false
[dependencies.fixed_decimal]
version = "0.7.2"
features = ["ryu"]
optional = true
default-features = false
[dependencies.icu_calendar]
version = "~2.3.0"
features = [
"alloc",
"ixdtf",
]
optional = true
default-features = false
[dependencies.icu_casemap]
version = "~2.3.0"
optional = true
default-features = false
[dependencies.icu_collator]
version = "~2.3.0"
optional = true
default-features = false
[dependencies.icu_collections]
version = "~2.3.0"
optional = true
default-features = false
[dependencies.icu_datetime]
version = "~2.3.0"
optional = true
default-features = false
[dependencies.icu_decimal]
version = "~2.3.0"
optional = true
default-features = false
[dependencies.icu_experimental]
version = "~0.6.0"
optional = true
default-features = false
[dependencies.icu_list]
version = "~2.3.0"
optional = true
default-features = false
[dependencies.icu_locale]
version = "~2.3.0"
optional = true
default-features = false
[dependencies.icu_locale_core]
version = "2.3.0"
features = ["alloc"]
default-features = false
[dependencies.icu_locale_fallback]
version = "~2.3.0"
optional = true
default-features = false
[dependencies.icu_normalizer]
version = "~2.3.0"
optional = true
default-features = false
[dependencies.icu_plurals]
version = "~2.3.0"
optional = true
default-features = false
[dependencies.icu_properties]
version = "~2.3.0"
features = [
"alloc",
"unicode_bidi",
]
optional = true
default-features = false
[dependencies.icu_provider]
version = "2.3.0"
default-features = false
[dependencies.icu_provider_adapters]
version = "~2.3.0"
features = ["serde"]
default-features = false
[dependencies.icu_provider_blob]
version = "~2.3.0"
features = ["alloc"]
optional = true
default-features = false
[dependencies.icu_segmenter]
version = "~2.3.0"
features = ["auto"]
optional = true
default-features = false
[dependencies.icu_time]
version = "~2.3.0"
features = [
"alloc",
"ixdtf",
]
optional = true
default-features = false
[dependencies.potential_utf]
version = "0.1.3"
features = ["writeable"]
optional = true
default-features = false
[dependencies.tinystr]
version = "0.8.4"
optional = true
default-features = false
[dependencies.unicode-bidi]
version = "0.3.11"
optional = true
default-features = false
[dependencies.writeable]
version = "0.6.4"
default-features = false
[dependencies.zerovec]
version = "0.11.7"
optional = true
default-features = false
[target.'cfg(not(any(target_arch = "wasm32", target_os = "none")))'.dependencies.icu_provider_fs]
version = "~2.3.0"
optional = true
default-features = false
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.libc_alloc]
version = "1.0.6"
features = ["global"]
optional = true
default-features = false
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.simple_logger]
version = "5.0.0"
optional = true
[lints.clippy]
alloc_instead_of_core = "warn"
bool_assert_comparison = "allow"
branches_sharing_code = "warn"
collection_is_never_read = "warn"
crosspointer_transmute = "warn"
dbg_macro = "warn"
debug_assert_with_mut_call = "warn"
doc_markdown = "warn"
exhaustive_enums = "deny"
exhaustive_structs = "deny"
fn_to_numeric_cast_any = "warn"
infinite_loop = "warn"
large_stack_arrays = "warn"
mismatching_type_param_order = "warn"
missing_fields_in_debug = "warn"
missing_transmute_annotations = "warn"
negative_feature_names = "warn"
or_fun_call = "warn"
same_functions_in_if_condition = "warn"
todo = "warn"
transmute_bytes_to_str = "warn"
transmute_int_to_bool = "warn"
transmute_int_to_non_zero = "warn"
transmute_ptr_to_ptr = "warn"
transmute_ptr_to_ref = "warn"
transmute_undefined_repr = "warn"
transmutes_expressible_as_ptr_casts = "warn"
trivially_copy_pass_by_ref = "deny"
unnecessary_wraps = "warn"
useless_transmute = "warn"
wildcard_dependencies = "warn"
[lints.rust]
missing_debug_implementations = "deny"
trivial_numeric_casts = "deny"
unused_lifetimes = "warn"
unused_macro_rules = "warn"
unused_qualifications = "warn"
[lints.rust.unexpected_cfgs]
level = "warn"
priority = 0
check-cfg = [
"cfg(icu4c_enable_renaming)",
"cfg(needs_alloc_error_handler)",
"cfg(icu4x_nightly_tests)",
"cfg(icu4x_run_size_tests)",
"cfg(icu4x_unstable_fast_trie_only)",
]