News for hackers. Stuff that matters.
Re:Maud: A Rust macro for writing HTML by mkj on Tuesday June 07, 2022 @06:10AM (#31652045)
Askama should be comparable in speed and type safety? It probably doesn't integrate any better inline with source though (I've only used it with standalone template files).

https://djc.github.io/askama/creating_templates.html#the-tem...

Regardless, it's good to see some variety and experimentation like Maud in software design

Re:Maud: A Rust macro for writing HTML by zaarn on Tuesday June 07, 2022 @07:12AM (#31652456)
Askama looks interesting, though the inheritance is a bit underdocumented.

Ideally, I'd imagine just making a "Global<T>" struct, where I insert the current page context like so "Global<LoginPage>" to get the final template. Though by the looks, it sounds more like LoginPage will simply have to have all the global context available via some attribute like "LoginPage.global".