9 releases

0.5.0 Nov 13, 2019
0.4.2 Jan 7, 2019
0.4.1 Oct 26, 2018
0.4.0 Aug 15, 2018
0.2.0 Jul 25, 2018

#11 in #intl

23 downloads per month


682 lines

Make Plural Rules

make_pluralrules is a code generator application that turns a Unicode CLDR plural rules AST into Rust code.

crates.io Build Status Coverage Status

The application is intended to generate code necessary for calculating correct plural rules categories.


The generator currently generates code for cardinal plural rules from CLDR 34 into Rust 1.31 and above.

Launch make_pluralrules with:

cargo run -- -i <./path/to/cldr.json>... -o <./path/to/output.rs>

Local Development

cargo build
cargo test

If you want to update the test fixtures to match your latest changes, please use:

cargo regenerate_fixtures_within | cargo regenerate_fixtures

When submitting a PR please use cargo fmt.


Thank you to all contributors!


~77K SLoC