10 releases (5 stable)

new 1.1.1 Jan 31, 2023
1.1.0 Jan 26, 2023
1.0.2 Oct 8, 2022
1.0.1 Sep 28, 2022
0.4.1 Nov 10, 2021

#27 in Internationalization (i18n)

Download history 26/week @ 2022-10-10 78/week @ 2022-10-17 12/week @ 2022-10-24 17/week @ 2022-10-31 9/week @ 2022-11-07 10/week @ 2022-11-14 15/week @ 2022-11-21 4/week @ 2022-11-28 11/week @ 2022-12-05 29/week @ 2022-12-12 15/week @ 2022-12-19 55/week @ 2022-12-26 20/week @ 2023-01-02 52/week @ 2023-01-09 35/week @ 2023-01-16 355/week @ 2023-01-23

464 downloads per month
Used in 2 crates

Unicode-DFS-2016

11MB
66K SLoC

icu_datagen crates.io

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

Data files can be generated either programmatically (i.e. in build.rs), or through a command-line utility.

Examples

build.rs

use icu_datagen::prelude::*;
use std::fs::File;

fn main() {
    icu_datagen::datagen(
        Some(&[langid!("de"), langid!("en-AU")]),
        &[icu::list::provider::AndListV1Marker::KEY],
        &SourceData::default(),
        vec![Out::Blob(Box::new(File::create("data.postcard").unwrap()))],
    )
    .unwrap();
}

Command line

The command line interface can be installed with the bin Cargo feature.

$ cargo install icu4x-datagen

Once the tool is installed, you can invoke it like this:

$ icu4x-datagen \
>    --keys all \
>    --locales de en-AU \
>    --format blob \
>    --out data.postcard

More details can be found by running --help.

More Information

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

Dependencies

~22–31MB
~619K SLoC