UP | HOME

Writing a Gemini server in C

Table of Contents

1. What is Gemini?

A few days ago, my brother introduced me to the internet protocol Gemini. It's basically a very lightweight alternative to the web, and while I'm not sure how much of a following it will ever have, I like its fundamental concepts. Particularly, I like that implementing a Gemini server from scratch is actually manageable for a single person. So that's what I started doing.

2. My implementation

You can find my server implementation in Gitlab. I have used the C programming language and called my program Soyuz. Currently, the entire source code resides in a single file. Soyuz is suitable for statically serving files to the client. The biggest issue currently is its complete lack of threading.

3. Literate programming

I plan to refactor Soyuz into a literate program and add it to the corresponding section of my homepage. I tried writing it as a literate program to begin with, but I found out that this approach does not work well for me when I have little experience with the libraries I use.

For getting to know a library, I need a more explorative coding style. However, I think the program in its current state could very well be converted into a literate program and then maintained as such. So that's the plan.

4. This was fun

It has been quite a while since my last recreational programming project. Even if Gemini never finds wide-spread adoption, I'm thankful for its existence if only for this nice day of programming.