Cargo Features

[dependencies]
icu_capi = { version = "2.0.0", default-features = false, features = ["any_provider", "buffer_provider", "provider_fs", "logging", "simple_logger", "default_components", "std", "calendar", "casemap", "collator", "datetime", "decimal", "experimental", "list", "locale", "normalizer", "plurals", "properties", "segmenter", "timezone", "compiled_data", "looping_panic_handler", "libc_alloc"] }
default = compiled_data, default_components, logging, simple_logger, std

These default features are set whenever icu_capi is added without default-features = false somewhere in the dependency tree.

any_provider
buffer_provider provider_fs?

Enables serde, serde of optional icu_segmenter and optional icu_time and icu_provider_blob

Optional ICU4X features (not components)

and serde of icu_locale_core, icu_provider, icu_provider_adapters, optional icu_calendar, optional icu_casemap, optional icu_collator, optional icu_datetime, optional icu_decimal, optional icu_experimental, optional icu_list, optional icu_locale, optional icu_normalizer, optional icu_plurals, and optional icu_properties

icu_locale_core:

Mandatory ICU4X components and utils

Affects provider::ffi

provider_fs = buffer_provider, std

Enables icu_provider_fs

logging default simple_logger = std

Enables log, log of diplomat-runtime and logging of icu_provider

icu_provider:

Enable logging of additional context of data errors

Affects icu_capi::unstable.logging

simple_logger default = logging

Enables simple_logger

default_components default = calendar, casemap, collator, datetime, decimal, list, locale, normalizer, plurals, properties, segmenter, timezone

Components

std default logging provider_fs?
calendar default_components

Enables icu_calendar and icu_time

Affects icu_capi::unstable.week, errors::ffi.CalendarError, errors::ffi.Rfc9557ParseError, icu_capi::unstable.calendar, icu_capi::unstable.date, icu_capi::unstable.datetime, icu_capi::unstable.time

casemap default_components

Enables icu_casemap

Affects icu_capi::unstable.casemap

collator default_components

Enables icu_collator

Affects icu_capi::unstable.collator

datetime default_components

Enables icu_calendar, icu_decimal, icu_plurals, and icu_time, experimental of icu_datetime

Affects errors::ffi.DateTimeMismatchedCalendarError, errors::ffi.DateTimeWriteError, icu_capi::unstable.date_formatter, icu_capi::unstable.date_time_formatter, icu_capi::unstable.datetime_options, icu_capi::unstable.time_formatter, icu_capi::unstable.timezone_formatter, icu_capi::unstable.zoned_date_formatter, icu_capi::unstable.zoned_date_time_formatter, icu_capi::unstable.zoned_datetime, icu_capi::unstable.zoned_time_formatter, errors::ffi.TimeZoneInvalidOffsetError, icu_capi::unstable.iana_parser, icu_capi::unstable.timezone, icu_capi::unstable.variant_offset, icu_capi::unstable.windows_parser, errors::ffi.CalendarError, errors::ffi.Rfc9557ParseError, icu_capi::unstable.calendar, icu_capi::unstable.date

decimal default_components

Enables fixed_decimal and icu_decimal

fixed_decimal:

Optional ICU4X components and their dependent utils

Affects errors::ffi.DecimalLimitError, icu_capi::unstable.decimal, icu_capi::unstable.fixed_decimal, errors::ffi.DecimalParseError

experimental

Enables icu_experimental

Affects icu_capi::unstable.displaynames, icu_capi::unstable.measure_unit_parser, icu_capi::unstable.units_converter

list default_components

Enables icu_list

Affects icu_capi::unstable.list

locale default_components

Enables icu_locale

Affects icu_capi::unstable.exemplar_chars, icu_capi::unstable.fallbacker, icu_capi::unstable.locale, icu_capi::unstable.locale_directionality

normalizer default_components

Enables utf16_iter and utf8_iter of icu_normalizer

Affects icu_capi::unstable.normalizer, icu_capi::unstable.normalizer_properties

plurals default_components

Enables fixed_decimal and icu_plurals

Affects icu_capi::unstable.pluralrules, errors::ffi.DecimalParseError

properties default_components

Enables icu_collections, icu_properties, and unicode-bidi

Affects icu_capi::unstable.bidi, icu_capi::unstable.collections_sets, icu_capi::unstable.properties_bidi, icu_capi::unstable.properties_enums, icu_capi::unstable.properties_iter, icu_capi::unstable.properties_maps, icu_capi::unstable.properties_names, icu_capi::unstable.properties_sets, icu_capi::unstable.properties_unisets, icu_capi::unstable.script

segmenter default_components

Enables icu_segmenter

Affects icu_capi::unstable.segmenter_grapheme, icu_capi::unstable.segmenter_line, icu_capi::unstable.segmenter_sentence, icu_capi::unstable.segmenter_word

timezone default_components

Enables icu_calendar and icu_time

Affects errors::ffi.TimeZoneInvalidOffsetError, icu_capi::unstable.iana_parser, icu_capi::unstable.timezone, icu_capi::unstable.variant_offset, icu_capi::unstable.windows_parser, errors::ffi.CalendarError, errors::ffi.Rfc9557ParseError, icu_capi::unstable.calendar, icu_capi::unstable.date, icu_capi::unstable.datetime, icu_capi::unstable.time

compiled_data default

Enables compiled_data of optional icu_calendar, optional icu_casemap, optional icu_collator, optional icu_datetime, optional icu_decimal, optional icu_experimental, optional icu_list, optional icu_locale, optional icu_normalizer, optional icu_plurals, optional icu_properties, optional icu_segmenter, and optional icu_time

looping_panic_handler

Adds a looping panic handler (useful for no_std targets)

libc_alloc

Uses malloc as the global allocator (useful for no_std targets)

Enables libc_alloc