Lavandula
Dev tools
web framework
SHOW HN2025
How HN took it
30 positive, 28 neutral or asking, 6 mixed, 19 critical, out of 83 comments about the project. Thread score +0.27.
Execution: 5 for, 15 againstIdea: 13 for, 2 againstDesign: 2 for, 1 againstDocs: 2 for, 0 againstPerformance: 0 for, 1 against
The thread, comment by comment
Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.
positive neutral or mixed critical about another commenter or something else the maker
What HN said
What people liked
Clean, readable, well-organised C code
From 4 comments
This is some of the cleanest, modern looking, beautiful C code I've seen in a while. I know it's not the kernel, and there's probably good reasons for lots of #ifdef…
faxmeyourcode on HNSome unsolicited feedback: I think the appRoute macro obfuscates the types and signatures, and introduces some unnecessary indirection. I would get rid of it. Related, the…
faichai on HNThat's a great example of how to write C in 2025. Congrats and well done.
kahlonel on HNI am convinced that well written C code is more aesthetically pleasing than well written code in other languages. Great job and thanks for sharing.
lordleft on HN
Good test framework design
From 1 comment
Nice work! I like the little test framework you built. Have you considered making runTest a macro so that you can print the name of the test along with the test result?
elevation on HN
Good README and clean dotenv parser
From 1 comment
The README gets straight to the point and I really like that. Additionally, the .env file parser is quite clean. https://github.com/ashtonjamesd/lavandula/blob/main/src/dotenv.c…
koito17 on HN
Objections
HTTP parser has memory safety issues and unchecked malloc/snprintf calls
From 4 comments
It's very dangerous to write a http parser from scratch in C. This can be very vulnerable without rigorous testing. To get a useful web framework for production in C, I think…
mistivia on HNThere is a heap overflow in the http parser. Should I spoil it or let people find it on their own?
OneLessThing on HNThe code is very readable and well organized. My only major critique is that there's very little error checking, e.g. there are many calls to snprintf and malloc without checking…
hgs3 on HNThanks for sharing; small is beautiful. A couple of points of feedback: - check return value from malloc(); - consider using your own arena allocator (which gets a larger block…
jll29 on HN
Uses no non-blocking I/O or threading; limited request buffer
From 2 comments
The code is very readable and well organized. My only major critique is that there's very little error checking, e.g. there are many calls to snprintf and malloc without checking…
hgs3 on HNVery nice! A couple of notes: you'll want to use non-blocking I/O and an event loop to prevent one slow client from locking up the whole server. You should also check for partial…
201984 on HN
Questionable usefulness compared to mature frameworks
From 2 comments
That's fair. And I do agree. The use cases for something like this are very thin compared to what tools you can use out there instead, Django, Rails, Express, etc. All of which…
ashtonjamesd on HNI'm stupid — is this to create web apps that run on the server? More or less replacing PHP or whatever?
JKCalhoun on HN
Requests
Add HTML templating
From 2 comments
People, stop trying to be so serious and nitpick this project. This is a great example of an actual HN worthy share. Someone built a cool project and explored the possibilities…
codegeek on HNI'm wanting to do the same thing. I've also already written a language (in C) to generate HTML (a template language), so these two go hand-in-hand!
coreyp_1 on HN
Add TLS/HTTPS support
From 2 comments
I like this, thanks for sharing. I recently did some work with a python web server using the basehttpserver and it was amazingly easy. Pythons even got built in tls support,…
globalnode on HNDoes it do HTTPS? I'd be interested to try it on ESP32 but it has to support HTTPS.
leptons on HN
Add IPv6 support
From 1 comment
Very nice! A couple of notes: you'll want to use non-blocking I/O and an event loop to prevent one slow client from locking up the whole server. You should also check for partial…
201984 on HN
Print test names via macro
From 1 comment
Nice work! I like the little test framework you built. Have you considered making runTest a macro so that you can print the name of the test along with the test result?
elevation on HN
Questions
Does it compile and what C standard does it use?
From 2 comments
I don't understand the example. Does it even compile? It's been a long time since I've used C, so maybe it's using some syntax that I'm unaware of? IE: What defines "home" that…
gwbas1c on HNwhich version of C does this conform to?
ranger_danger on HN
Is it one thread per request?
From 1 comment
Nice. Is if a one thread per request model? Does it support async await type of architecture?
ak39 on HN
How compatible is it with embedded devices?
From 1 comment
How compatible is this with embedded devices? How much does this depend on OS APIs?
dariosalvi78 on HN
Alternatives named
libmicrohttpd, libevent, fastcgi
From 1 comment
It's very dangerous to write a http parser from scratch in C. This can be very vulnerable without rigorous testing. To get a useful web framework for production in C, I think…
mistivia on HN
Jetzig
From 1 comment
Hi, I think this is great. I've really enjoyed working with Jetzig, which is sort of similar. I also love the BSD C CGI Postgres stack. I'm just a CRUDmonkey with mostly python…
sroerick on HN
Django, Rails, Express
From 1 comment
That's fair. And I do agree. The use cases for something like this are very thin compared to what tools you can use out there instead, Django, Rails, Express, etc. All of which…
ashtonjamesd on HN