Zabadi -Unicode Bidirectional Algorithm in Zig

Hello.

My Zig project for the past week or so has been porting the Unicode Bidirectional Algorithm from the Rust unicode-bidi crateto Zig. The port includes all code, tests, and comments.

The port is essentially complete and all the tests pass, including the ones provided by Unicode.

This is still a work in progress however. Improvements to memory management and performance are in order. Also I would like to have usage-based feedback on the shape of the API and any potential improvements there.

8 Likes

Hey everyone.

I updated the library to Zig 0.15.1 (and used addModule instead of createModule like a dummy). Also I cleaned up some internal data organization to use ArrayLists mostly.

The new release is in 0.2.0. I feel the API needs trimming but I would like some feedback regarding their use. Before

You can check out an example of the library’s output and use by running zig build example .

Please feel free to poke around and give me any feedback you can think of to improve the library internally and its API.

2 Likes

Hello everyone.

With thankful help from Jacob Sandlund and his uucode library, I implemented it currently as the default data source instead of the one I had before. It gave very pronounced performance improvements in the benchmarks.

Oh and I also added benchmarks.

If you are handling text in any way do your users a favor and use zabadi. any feedback over the API or any potential performance improvements are most welcome.