Zunic: allocation-free Unicode library for Zig

I’ve been working on zunic , a Unicode library for Zig:

zunic provides a Unicode toolkit in a single dependency. I focused on things that require understanding and touching the actual Unicode spec and tried to implement them with performance as a top priority. I left out functionality that is easy to build as an add-on.

zunic offers:

  • UTF-8 validation, decoding, encoding, and iteration
  • Extended grapheme cluster segmentation
  • Unicode line breaking
  • Unicode normalization (NFC, NFD, NFKC, NFKD)
  • Character/display width
  • Unicode property lookup
  • Text wrapping and other higher-level utilities that have to touch the spec.

Feedback on the API, performance, implementation, and missing functionality is very welcome.

I know that for many devs this is a sensitive topic, so keep in mind zunic is largely built using AI. If this makes a difference to you regardless of shape, features and performance, you may want to read this post: I built a Zig Unicode library with AI. · blog.vrypan.net