Experiment with LLM, Zig, and ChaCha

[ChaCha20-Zig]:


https://codeberg.org/AstraLibernis/chacha20-zig/src/branch/main

This started as an experiment with Age/Rage and LLM coding. My base knowledge is Python, but I love the idea that LLM coders allow you to branch out and learn new things. So bear this in mind, most everything generated was written by Claude and read, iterated, and directed by me.

The short version was I originally leaned to Rust as the small/fast language. But I figured Zig was supposed to inherit C and be small/fast too. So I moved off Age and into ChaCha encryption where the Zig default library was a bit slower than everyone. I thought ‘Why is that so?’. That led me to several rounds and hours of playing/experimenting with and learning how to benchmark this.

The summarized findings were : I was able to get Zig ChaCha to encrypt faster than all the other standards below 512. I have not implemented 512 yet. Per my little helper "So in plain terms: you wrote, in portable Zig with zero assembly and zero per-CPU intrinsics, the fastest non-assembly ChaCha20 measured here — about 5× faster than Zig’s own standard library — and for small messages (the size of network packets), the fastest implementation full stop, assembly included. "

Im posting this just to say hello! Maybe someone will find this interesting or incorporate it somewhere along the line. I didnt do this to ‘fix’ anything or ‘prove’ anything. I did it as an experiment to learn: Coding with LLMs, Zig capabilities

Supported Zig versions

what versions are supported?
Zig 0.16.0 — the Fedora rpm (zig-0.16.0-1.fc44),

AI / LLM usage disclosure

Claude Opus 4.8
I hate the term vibecoding, but I also understand the intense feelings towards it. I tried my best to use the LLM to bounce my ideas and record verifiable facts/systems. I have a benchmarking tool included in this that I made, and CSVs of multiple runs across 2 computers to measure.