1 release (0 unstable)

new 2.0.0-beta1 Nov 23, 2024

#420 in Internationalization (i18n)


Used in icu_provider_source

Unicode-3.0

505KB
8K SLoC

icu_provider_export crates.io

icu_provider_export is a library to generate data files that can be used in ICU4X data providers.

For command-line usage, see the icu4x-datagen binary.

Also see our datagen tutorial.

Examples

use icu_provider_export::blob_exporter::*;
use icu_provider_export::prelude::*;
use icu_provider_source::SourceDataProvider;
use std::fs::File;

let provider = SourceDataProvider::new_latest_tested();

ExportDriver::new(
    [DataLocaleFamily::FULL],
    DeduplicationStrategy::None.into(),
    LocaleFallbacker::try_new_unstable(&provider).unwrap(),
)
.with_markers([icu::list::provider::AndListV2Marker::INFO])
.export(
    &provider,
    BlobExporter::new_with_sink(Box::new(
        File::create("data.postcard").unwrap(),
    )),
)
.unwrap();

Cargo features

More Information

For more information on development, authorship, contributing etc. please visit ICU4X home page.

Dependencies

~4.5MB
~83K SLoC