Crates.io | icu_provider_export |
lib.rs | icu_provider_export |
version | 2.0.0-beta1 |
source | src |
created_at | 2024-11-23 02:23:12.726706 |
updated_at | 2024-11-23 02:23:12.726706 |
description | Generate data for ICU4X DataProvider |
homepage | https://icu4x.unicode.org |
repository | https://github.com/unicode-org/icu4x |
max_upload_size | |
id | 1458184 |
size | 82,455 |
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.
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();
baked_exporter
baked_exporter
] module, a reexport of [icu_provider_baked::export
]blob_exporter
blob_exporter
] module, a reexport of [icu_provider_blob::export
]fs_exporter
fs_exporter
] module, a reexport of [icu_provider_fs::export
]rayon
For more information on development, authorship, contributing etc. please visit ICU4X home page
.