# 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_datagen" description = "Generate data for ICU4X DataProvider" license = "Unicode-3.0" include = [ "data/**/*", "src/**/*", "examples/**/*", "benches/**/*", "tests/**/*", "!tests/data/json/**/*", "!tests/data/postcard/**/*", "Cargo.toml", "LICENSE", "README.md", ] default-run = "icu4x-datagen" 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 [dependencies] # DatagenDriver displaydoc = { workspace = true } icu_locid = { workspace = true, features = ["std"] } icu_provider = { workspace = true, features = ["std", "logging", "datagen", "experimental"]} log = { workspace = true } memchr = { workspace = true } once_cell = { workspace = true, features = ["std"] } rayon = { workspace = true, optional = true } writeable = { workspace = true } # Exporters icu_provider_blob = { workspace = true, features = ["export"], optional = true } icu_provider_fs = { workspace = true, features = ["export"], optional = true } crlify = { workspace = true, optional = true } databake = { workspace = true, optional = true} proc-macro2 = { workspace = true, optional = true } # The components are needed for the registry, provider, baked exporter, with different features icu = { workspace = true } icu_calendar = { workspace = true } icu_casemap = { workspace = true } icu_collator = { workspace = true } icu_datetime = { workspace = true } icu_decimal = { workspace = true } icu_list = { workspace = true } icu_locid_transform = { workspace = true } icu_normalizer = { workspace = true } icu_plurals = { workspace = true } icu_properties = { workspace = true } icu_segmenter = { workspace = true } icu_timezone = { workspace = true } icu_experimental = { workspace = true, optional = true } # DatagenProvider ## ICU infrastructure calendrical_calculations = { workspace = true, optional = true } icu_codepointtrie_builder = { workspace = true, optional = true } icu_collections = { workspace = true, features = ["serde"], optional = true } icu_pattern = { workspace = true, features = ["alloc"], optional = true } icu_provider_adapters = { workspace = true, optional = true } litemap = { workspace = true, optional = true, features = ["serde"] } tinystr = { workspace = true, features = ["alloc", "serde", "zerovec"], optional = true } zerotrie = { workspace = true, features = ["alloc"], optional = true } zerovec = { workspace = true, features = ["serde", "yoke"], optional = true } ## External dependencies either = { workspace = true, optional = true } elsa = { workspace = true, optional = true } itertools = { workspace = true, optional = true } ndarray = { workspace = true, optional = true } num-bigint = { workspace = true, optional = true } num-rational = { workspace = true, optional = true } num-traits = { workspace = true, optional = true } serde = { workspace = true, features = ["derive", "alloc"], optional = true } serde_json = { workspace = true, optional = true } serde-aux = { workspace = true, optional = true } toml = { workspace = true, optional = true } twox-hash = { workspace = true, optional = true } ureq = { workspace = true, optional = true } zip = { workspace = true, features = ["deflate"], optional = true } # "bin" feature clap = { workspace = true, optional = true, features = ["derive"] } eyre = { workspace = true, optional = true } simple_logger = { workspace = true, optional = true } [dev-dependencies] crlify = { path = "../../utils/crlify" } elsa = { workspace = true } icu = { path = "../../components/icu" } postcard = { workspace = true } simple_logger = { workspace = true } [features] default = ["bin", "use_wasm", "networking", "legacy_api", "rayon", "fs_exporter", "blob_exporter", "baked_exporter", "provider"] provider = [ "icu_calendar/datagen", "icu_casemap/datagen", "icu_collator/datagen", "icu_datetime/datagen", "icu_decimal/datagen", "icu_experimental?/datagen", "icu_list/datagen", "icu_locid_transform/datagen", "icu_locid/serde", "icu_normalizer/datagen", "icu_plurals/datagen", "icu_properties/datagen", "icu_segmenter/datagen", "icu_segmenter/lstm", "icu_timezone/datagen", "dep:calendrical_calculations", "dep:icu_codepointtrie_builder", "dep:icu_collections", "dep:icu_pattern", "dep:icu_provider_adapters", "dep:litemap", "dep:tinystr", "dep:zerotrie", "dep:zerovec", "dep:either", "dep:elsa", "dep:itertools", "dep:ndarray", "dep:serde", "dep:serde_json", "dep:serde-aux", "dep:toml", "dep:twox-hash", "dep:zip", ] baked_exporter = [ "dep:crlify", "dep:databake", "dep:proc-macro2", "dep:itertools", "icu_calendar/datagen", "icu_casemap/datagen", "icu_collator/datagen", "icu_datetime/datagen", "icu_decimal/datagen", "icu_list/datagen", "icu_locid_transform/datagen", "icu_normalizer/datagen", "icu_plurals/datagen", "icu_properties/datagen", "icu_segmenter/datagen", "icu_timezone/datagen", "icu_experimental?/datagen", ] blob_exporter = ["dep:icu_provider_blob"] blob_input = [ "dep:icu_provider_blob", "icu_calendar/datagen", "icu_casemap/datagen", "icu_collator/datagen", "icu_datetime/datagen", "icu_decimal/datagen", "icu_list/datagen", "icu_locid_transform/datagen", "icu_normalizer/datagen", "icu_plurals/datagen", "icu_properties/datagen", "icu_segmenter/datagen", "icu_timezone/datagen", "icu_experimental?/datagen", ] fs_exporter = ["dep:icu_provider_fs"] legacy_api = ["fs_exporter", "blob_exporter", "baked_exporter", "provider"] bin = ["dep:clap", "dep:eyre", "dep:simple_logger"] rayon = ["dep:rayon"] # Use wasm for building codepointtries use_wasm = ["icu_codepointtrie_builder?/wasm"] # Use local ICU4C libraries for building codepointtries # (will do nothing if used with `use_wasm`) # If neither `use_wasm` nor `use_icu4c` are enabled, # rule based segmenter data will not be generated. use_icu4c = ["icu_codepointtrie_builder?/icu4c"] networking = ["dep:ureq"] experimental_components = [ "dep:icu_experimental", # For registry "icu_datetime/experimental", # For registry "icu_plurals/experimental", # Only required if both provider and experimental are enabled, but that's not expressible with features "dep:num-bigint", "dep:num-rational", "dep:num-traits", "icu/experimental", ] [[bin]] name = "icu4x-datagen" path = "src/bin/icu4x-datagen.rs" required-features = ["bin"] [package.metadata.cargo-all-features] # We don't need working CPT builders for check skip_feature_sets = [["use_icu4c"], ["use_wasm"]] skip_optional_dependencies = true always_include_features = [ # Always the experimental deps because we want to all-or-nothing them # and the nothing case is already tested in regular check CI "experimental_components", # The binary requires either provider or blob_input to build, and blob_input is cheaper "blob_input" ] # We have a *lot* of features here max_combination_size = 2