Zg: a Zig Unicode Library

Announcing the public beta of zg v0.14.0.

This updates zg to Unicode 16.0, and implements a long backlog of refactorings. Most zg users will need to make changes to run 0.14, but these should be fairly straightforward. Please read the NEWS to get a sense of what’s changed, and the new README to see the new API in action.

There’s an issue tracking the release, please report any problems discovered there, and subscribe to be notified of any subsequent beta releases, and the eventual public release.

I will also post in this thread when zg v0.14.0 is tagged and merged.

34 Likes

v0.14.0 is published.

5 Likes

Any plans to extend further unicode support in mvzr ? (and make it vzr :slight_smile: )

2 Likes

TL;DR: no.

I have more ambitious plans than that, in fact. Progress on which continues in bursts when I have the time and energy. That project will be able to compile and parse regexen as a subset of its functionality.

However, mvzr has some fairly tight design constraints which preclude adding much more in the way of features. If and when I think of clever ways to make it do just a bit more, I add that, and I fix any bug which turns up within its feature set, but that’s it.

So it won’t be a descendant of mvzr, or a rewrite of it. It’s a whole different thing.

1 Like

Just released: zg v0.14.1. This adds reverse grapheme iterators, graphemeAtIndex, and the ability to start a forward or backward iteration, given a grapheme. Grapheme length is now u32, not u8.

Also added is word segmentation, with an interface based on that of Grapheme.

Please see the NEWS.md for all the details and credits.

8 Likes

We now have a preview release for zg v0.16.

This merges all of Jacob Sandlund’s work on removing allocation from all Unicode modules, along with several other modest improvements. See the NEWS.md for details.

Upgrading should be as simple as removing all instances, and calling the various functions they provide directly from the container type.

The official 0.16 release of zg will target Zig v0.16, sometime after it is officially released. Preview releases will remain viable, for anyone who needs to stick with Zig 0.15.x for awhile.

11 Likes

Bravo! :+1::+1::+1:

1 Like