Hi everyone!
When I first released Jazzy (a developer-friendly web framework for Nim), my main focus was building a solid REST API backend. But honestly, I didn't expect to get so many requests from the community for a built-in HTML template engine.
So... I listened! With v0.4.0, I'm introducing Melody.
Instead of fighting the compiler or dealing with complex DSLs, Melody is heavily inspired by Laravel Blade. It's just plain HTML with some sweet and simple directives ({{ $var }}, @if, @foreach, and a full @extends layout system).
Here is a quick taste of how clean it looks:
<ul>
@foreach(users as user)
@if(user.isActive)
<li>{{ $user.name }} ({{ $user.email }})</li>
@endif
@endforeach
</ul>
Since performance is key in Nim, I designed the parser to be zero-allocation (using string spanning). But more importantly, we focused on real-world stability and speed by building a robust Two-Tier Caching System. In production, it ensures maximum performance by safely caching your views. In dev mode, it provides automatic hot-reloading—so you don't need to restart your server just because you changed an HTML tag or CSS class.
I also sneaked in some database goodies (pagination, soft deletes, auto timestamps) into this release while I was at it.
You can check out the Melody docs here or peek at the examples/with_views folder in the repo to see how it looks in action.
Let me know what you think! Also, I'd love to hear your brutally honest feedback: Is there anything in the framework's current state that bothers you or feels missing?
feels missing
CI tests but i am new to nim...