kitsune-soc / kitsune

🦊 (fast) ActivityPub-federated microblogging

Home Page:https://joinkitsune.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Migrate from Askama to Ramhorns

aumetra opened this issue · comments

Is your feature request related to a problem? Please describe.

Kitsune isn't especially fast to compile at the moment. I'm working on trying to improve that but for now it's the unfortunate status-quo.
Iterating over different template changes is a pain since we have to fully recompile and relink parts of the code which can be slow depending on your setup.

Describe the solution you'd like

Ramhorns is a fast templating library and, most importantly, supports loading templates at runtime.
Utilizing that possibility, we can use our rust-embed dependency to load the templates from disk during debugging and include them into the binary during release builds.

This allows us to keep similar performance to Askama while not requiring to recompile parts of Kitsune and relinking it every time the template changes.

Why open that issue now and not earlier? Well, Ramhorns is GPL licensed. During the time Kitsune was MIT licensed we weren't able to use the library.
Now that we are AGPL licensed, using that library is a non-issue.

Ramhorns is MPL-2.0 now.