▲ | petcat 4 days ago | |||||||
> As part of my ongoing project to reimplement Django’s templating language in Rust, I have been adding support for custom template tags. Cool project, but does the author know about minijinja [1]? | ||||||||
▲ | Klonoar 4 days ago | parent | next [-] | |||||||
There is little chance they don't know about minijinja/askama/tera/etc. The repo for their project outlines why they're doing this, though: https://github.com/LilyAcorn/django-rusty-templates It's seemingly being made for being used in Django as a template backend, not necessarily for use from Rust like the others (i.e native-ifying Django templates). | ||||||||
| ||||||||
▲ | Rendello 4 days ago | parent | prev [-] | |||||||
I just ported some code from Python to Rust, and spent a good few days pouring over the template/DOM ecosystem. What I really wanted was a Rust version of Python's Dominate library, which allows you to write your DOM nodes as regular objects and render the tree with nice (locally controllable) indentation. I didn't want templates, and I wanted something that allowed me to control indentation, leave comments in the HTML, and write code as code. I ended up spending a week implementing something similar to Dominate in Rust. |