Announcing Jetzig (web framework) and Zmpl (templating language) for Zig

Here are some links if you want to skip reading the text below:

I have been working on a “batteries-included” web framework for Zig for a couple of months in my spare time. The project has been coming along quite well and already has some pretty nice features, including a Templ-like (kind of) templating language called Zmpl, dynamic JSON/template data object building, structured encrypted user session cookies, static content rendering, file-based routing and template discovery, etc.

It has a long way to go before being production ready but it is now possible to create “real” web applications with it. I am using it with HTMX and I am finding Zig a very nice language to use for web dev (I come from a Python/Ruby background).

I have a long list of features I plan to add to the framework and it is winter here so I am not going outside much. :slight_smile:

Hope you are all having a nice weekend.


Haven’t looked at the code or tried it, but had to say: That logo ROCKS!


Haha, yeah I just got it today, I’ll add a link to the designer’s fiverr to the website.

Thank you so much for your videos, I watch all of them and have learned so much, I’ve been planning to make a donation to your channel soon !


would you use the zmpl file extension instead of an html one?

You might be interested in dependency injection and automatic body/path/query de-serialization into structs like I do here GitHub - Cloudef/zig-router: Straightforward HTTP-like request routing.

1 Like

Great, I will take a look ! Jetzig routing is very basic at the moment and I am expecting to overhaul it completely (internally), so anything I can learn from your work would be very helpful.

I thought about using .html.zmpl but I decided to go with .zmpl since Zmpl is (primarily) an HTML templating language, so the extra extension seemed redundant.

I’m hoping I can figure out how to get zls integration working but that’s for later.


Hi again, just coming back from illness so apologies for the delay but wanted to let you know I added a link to your project to Jetzig’s GitHub here: GitHub - jetzig-framework/jetzig: Jetzig is a web framework written in Zig