Gemini server in ~150 of Zig

Hi guys,
I wanted to try Zig recently and decided to implement a gemini (protocol) server. I’ve been running my own gemini capsule (a web site in gemini space) for a few years and I thought it would be nice to write my own server.
Since it’s a showcase, the code is over here.

The fact that it’s about 150 lines of code is an incident really. I just prototyped it and kind of liked the size, so decided to keep it this way. It’s completely acceptable for my needs and may be acceptable by somebody else too hopefully.

But more importantly is that I haven’t felt so much joy using a language in a long time. It was great. There were a few days when I tried to wake up earlier to write a bit more Zig before I go to work. It’s a first programming language I looked into the source code of. And it is nice and clear. Thank you everyone involved for making it such a joy! Hope I can give something back to the community too :slight_smile:

13 Likes

Hi @krydos, welcome to Ziggit!

I can see where the minimalism of Gemini would be a good fit with the Zig philosophy.

I’m glad you’re having fun. The server code is easy to follow, I learned a lot about how Gemini works (it’s been on my radar but I’ve never dived in). Definitely reminds me of the early Web.