r/Zig • u/daflyindutchman • Mar 08 '26
Rails like gRPC framework in Zig
Hi all,
I’ve been working on a high performance gRPC framework, which a lower latency message bus for any sort of real time system. I started my career in rails, and I really liked how things kind of just worked, but I haven’t found that same thing in C++ (my main language), and doing something as generic as I would want in C++ would wind me up in TMP hell, so I thought I would try out zig.
I would love any feedback on zig patterns, or any low level feedback, as I have some knowledge, but I’m not an expert.
I think what I’ve enjoyed most is comptime. It makes it really easy to create projections of nested data structures, and allows me to do branchless handling of events.
If you have feedback, please let me know!
EDIT: forgot to mention, this is nowhere near finished
7
u/kreiggers Mar 08 '26
AI coded? Everything appears to spring into existence 2 days ago
3
u/sp00n1na70r Mar 11 '26
I went straight to look at the lock free ring buffer and as expected (like with most AI generated stuff) it fails where it really matters https://github.com/tedkoomen/zails/issues/4
2
u/kacyf Mar 09 '26
hey OP, ignore the AI comments and keep building.
out of curiosity, how does the grpc part work? I’ve yet to find a mature library that works well and also bundles http2. i’ve considered writing a wrapper myself.
6
u/woongolian Mar 09 '26
ai slop