Thursday, November 5, 2026 Today’s Paper
Log in Join free
Vol. I · No. 37 Texas Edition
Thursday, Nov 5
Texas first. Then the world.
Always free Updated 2 minutes ago
Read. React. Discuss.
Tech

Show HN: Fast, Zero Allocation, AOT Safe, Compile-Time Safe .NET Template Engine

By ggende 3 min read 4 views 0 comments

I built a text templating engine, that I've named Lissic, as part of a personal website project I'm working on. It fits a niche that I don't think anything else in the .NET ecosystem fills. I prefer to keep code out the template itself (separation of concerns, view vs model, and all that). I also wanted to build something simple enough that I could imagine low/medium-tech UI dev working with it, but it still needs to build things in a modular way, support loops, support conditional/branching views, and have the ability to format/filter values inserted into the text.I've improved Lissic to the point that I think it's worth sharing with the community. A quick overview of the features:- Renders near twice as fast as the fastest major .NET templating engine (see below)
- Zero allocation with default settings, when rendering to a buffer (e.g. to HttpResponse.BodyWriter)
- 100% AOT compatible without any restrictions (no use of Reflection or dynamic)
- Simple but powerful tagging system that keeps a clear division between layout and logic
- Compile-time safety with source-generated Data Transfer Objects that automatically adjust to each template's text
- Define templates directly in…

Hacker News (Newest) Original story · github.com
Read the full story

Discussion (0)

No comments yet. Start the conversation!