Later – a Unicode Collation Algorithm implementation

Hi all. I’ve seen some really nice Unicode-related libraries in Zig, particularly from @mnemnion whose work I admire. I thought it might be fun and educational for me, and perhaps useful to the community, to write a zero-dependency implementation of the Unicode Collation Algorithm. I named it later. The design is inspired by a similar library that I maintain in Rust, feruca.

In terms of features, later is pretty barebones, but it does pass the official UCA conformance tests, for both the Default Unicode Collation Element Table (DUCET) and the root collation order of the Common Locale Data Repository (CLDR). And I would say it’s reasonably fast and memory-efficient. A usage example is given in the readme.

Suggestions are welcome. This is the first package of any real magnitude or complexity that I’ve written in Zig. A good way to learn an elegant language!

14 Likes