Show HN: Zedis – A Redis clone I'm writing in Zig
54 comments
·September 19, 2025reenorap
This is an interesting project but a poorly chosen name because it can easily be considered trademark infringement for being confusingly-similar to "Redis", especially since it's a self-admitted clone. I would change it now before you are forced to change your name and you lose time confusing people and wasting time renaming everything.
esafak
Consider adding support for vector search and sketching (https://www.sketchingbigdata.org/).
barddoo
I'll take a look. Thanks for the suggestion!
jasonjmcghee
I'm not really sure what it costs these days - i know certain projects not entirely free like they were a few years ago, but there's a pretty good "build your own redis" among other things.
It has little step-by-step tasks with automated tests. There are some other good ones like git and docker. It's pretty cool.
nine_k
It's easy to write a KV store, even a KV store with key expiration. But Redis is quite a bit more than that. Consider sharding and replication at least. Then lists, sets, zsets, bitfields, streams, geospatial indexes, hyperloglog / bloom filters, time series.
Something like LevelDB is relatively easy to write. Then you can build the rest of Redis on top of it.
barddoo
Sounds pretty interesting.
johnisgood
Seems like LLMs are getting good at Zig (with some help, I presume).
mtlynch
Is there anything about this project that seems LLM-generated?
I've found that LLMs are particularly bad at writing Zig because the language evolves quickly, so LLMs that are trained on Zig code from two years ago will write code that no longer compiles on modern Zig.
jasonjmcghee
I skimmed, for me it was this: https://github.com/barddoo/zedis/blob/87321b04224b2e2e857b67...
There seems to be a fair amount of stigma around using llms. And many people that use them are uncomfortable talking about it.
It's a weird world. Depending on who is at the wheel, whether an llm is used _can_ make no difference.
But the problem is, you can have no idea what you're doing and make something that feels like it was carefully hand-crafted by someone - a really great project - but there are hidden things or outright lies about functionality, often to the surprise of the author. Like, they weren't trying to mislead, just didn't take them time to see if it did all of what the LLM said it did.
boredemployee
3 months ago I was vibe coding an idea and for some reason (and luck) I went to check a less important part of the code and saw that the LLM changed the env variable of an API key and hard coded the key explictly in the code. That was scary. I'm glad I saw it before PR and shit like that.
barddoo
[dead]
5-
https://github.com/barddoo/zedis/blob/87321b04224b2e2e857b67...
these seem to occur only in college assignment projects, and in the output of text generators trained on those.
nine_k
Has been doing this for years, even before LLMs were a thing. No, not in college assignments; by the time emoji appeared, I had long since walked out of my PhD program and went to the industry.
I put such emojis at the beginning of big headings, because my eyes detect compact shapes and colors faster than entire words and sentences. This helps me (and hopefully others) locate the right section easier.
In Slack, I put large emojis at the beginning of messages that need to stand out. These are few, and emojis work well in this capacity.
(Disclaimer: I may contain a large language model of some kind, but very definitely I cannot be reduced to it in any area of my activity.)
WD-42
I will never place emojis in any of my readmes ever again.
rmonvfer
As an avid Claude Code user, I can tell you with 99% probability, that README is LLM-generated. This exactly the same structure and wording used by Claude (of course, it has some human modification because otherwise I’d filled with emojis)
In my experience, when you work with something like agentic development tools, you describe your goals and give it some constraints like “use modern zig”, “always run tests”… and when you ask it to write a README, it will usually reproduce those constraints more or less verbatim.
The same thing happens with the features section, it reads like instructions for an LLM.
I might be wrong but I spend way too much time using Claude, Gemini, Codex… and IMHO it’s pretty obvious.
But hey, I don’t think it’s a problem! I write a lot of code using LLMs, mostly for learning (and… ejem, some of it might end up in production) and I’ve always found them great tools for learning (supposing you use the appropriate context engineering and make sure the agent has access to updated docs and all of that). For example, I wanted to learn Rust so I half-vibed a GPUI-based chat client for LLMs that works just fine and surprisingly enough, I actually learned and even had some fun.
adastra22
I don't know why you're being downvoted. This follows the LLM-generated-README template perfectly. And yeah, it usually ends up being a dumping ground for the constraints you gave it, almost verbatim.
barddoo
Oh that’s nice of you. I take that as a compliment.
maleldil
From the README:
> Memory safety with RAII patterns
I'm curious to see how they achieve RAII in Zig, which doesn't have destructors. If they mean defer + deinit methods, that's not the same thing.
justinhj
Zig is all about making things explicit. Destructors are hidden code. I presume there will be an application level tracking of lifetime.
pdntspa
Is zig lang stable enough now to start basing real projects on it?
pyrolistical
Depends on your definition of stable. I would suspect most people would consider it unstable as they are still breaking the API for async. Wait for 1.0 if you really need true stability. But zig is just so good not to use now
barddoo
The standard library is changing too much to be honest. During the development of the library Zig 0.15 launched and changed the whole Io library.
justinhj
Check out Tigerbeetle and Ghostty
jrpelkonen
Also bun
fishmicrowaver
I mean no offense but a billionaires vanity terminal and a database with an anime bug mascot are a bit different than a redis alternative
rvrb
Good point, the database written in Zig with a bug mascot tells us nothing about writing a database in Zig without a bug mascot
justinhj
If all you know about Tigerbeetle is the mascot you should probably take another look before judging. Some very interesting db tech.
dpatterbee
Is software not real software if it's written by a billionaire? What is it about the bug mascot that detracts from the database's legitimacy?
aschobel
bun is real and spectacular. super loving using it
nitishr
it hasn't reached version 1.0
tonyhart7
"Is zig lang stable enough now to start basing real projects on it?"
only if you want to refactor/rewrite a lot
znpy
OT: Reminds me of the late 2000s when python was having its boom and it was a lot of pythis and pythat
barddoo
I just made it to learn Zig
nitishr
Are you keeping it single threaded?
barddoo
No, I wasn’t able to get it working with async io using io_uring/kqueue.
BiraIgnacio
cool stuff, keep at it!
barddoo
Thanks! There are so many things to do still, authentication, glob-style keys search, json parsing.
tcfhgj
So riiR is now riiZ? ;)
nine_k
"Rewrite it away from C (or C++)". Whether you choose Rust, Zig, Ada, D, Nim, even Pascal, it's likely going to become more secure. It will be supported on fewer platforms though, but still should run fine under Linux, macOS, Windows, *BSD, on x64, Arm64, and likely RISC-V, too.
maleldil
Zig isn't memory safe, though. It's safer than C or C++, but not much.
ashikns
This is what I have struggled to understand about Zig. It seems pretty much like C in a mental model aspect - you are responsible for everything. It's slightly better than C, but C already runs on everything on the planet and can be made secure even if painfully so. So what niche is Zig aiming to fill?
throwawaymaths
checked array bounds is memory safety.
Writing Redis from scratch in Zig.