4 releases

0.1.3 Mar 13, 2020
0.1.2 Jul 21, 2019
0.1.1 Mar 6, 2018
0.1.0 Mar 6, 2018

#113 in Data structures

Download history 116241/week @ 2021-02-26 113132/week @ 2021-03-05 133381/week @ 2021-03-12 121239/week @ 2021-03-19 136717/week @ 2021-03-26 130989/week @ 2021-04-02 139647/week @ 2021-04-09 141178/week @ 2021-04-16 142186/week @ 2021-04-23 136448/week @ 2021-04-30 158533/week @ 2021-05-07 177900/week @ 2021-05-14 181668/week @ 2021-05-21 181843/week @ 2021-05-28 197482/week @ 2021-06-04 162907/week @ 2021-06-11

565,328 downloads per month
Used in 4,324 crates (6 directly)


6.5K SLoC


A library that provides compressed trie sets specifically tailored toward representing boolean Unicode character properties.

Linux build status




This project is licensed under either of


The ucd-trie crate provides a compressed trie set specifically tailored for Unicode codepoints. The principle use case for such a trie is to represent properties defined by Unicode that correspond to sets of Unicode codepoints. (These properties are formally called boolean properties or "single valued" properties. See UTR#23 S3.3 for more details.)

This crate has two principle types: TrieSetOwned and TrieSetSlice, corresponding to a similar split as there is between Vec<T> and &[T]. TrieSetOwned is the only way to construct a trie from a set of Unicode codepoints.

The intended use of this library is to embed a static instance of TrieSetSlice into your source code, and then use its methods as defined in this crate to test membership. (The ucd-generate tool can likely generate this code for you.)

Finally, while this crate uses the standard library by default, it provides no_std functionality by disabling the std feature. When no_std is enabled, then TrieSetOwned is not provided. Instead, only TrieSetSlice is provided, which means no_std crates can still embed tries into their code.

No runtime deps