Odysseus consists of a number of "internal pages" for browser history, topsites, error messages and more. I mostly treat these as regular webpages to lower perceived complexity and because it can be useful.

Like many webpages these internal ones run a query against a relational database (SQLite here) and uses a templating language (one derived from Django's syntax). The difference though is that this relational database is gathered by your browser.

I opted to implement that templating language myself having decided I couldn't afford the startup cost or limited features of using an existing one. Furthermore segfaults pushed me into implementing it mostly from relative scratch, including (unfortunately) it's i18n engine.

It's quite simple interpretor with a two-pass lexer, a reentrant parser, and interpretation/parsing being done via dynamic dispatch (the template tag parsers may callback into the main parser).

The job of this templating language is very simple: take input from external datasources (implemented as an OO interface, may include SQLite, URIs, etc), and move it into place into an output stream (another interface, which may or may not simply wrap GIO).

For efficiency I've setup my Meson build system to use GResource to compile the templates into Odysseus's executable file, and I use GLib Bytes to avoid allocating and copying data around as it moves into place.