Forking rocket_dyn_templates into rocket_tera
By Kunal MehtaI have forked the rocket_dyn_templates crate into a new rocket_tera one. I believe the approach I've settled on will be better for both users and make it easier to maintain long-term.
Background#
rocket_dyn_templates provides integration between the Rocket web server framework, and three different templating libraries: tera, handlebars, and minijinja. When I initially started working on Rust projects, I picked Rocket because of its similarity to Flask, and Tera because of its similarity to jinja (at the time minijinja wasn't supported).
Rocket is un(der)maintained, to say the least. For me at least this hasn't been a major issue and honestly I appreciate there isn't a giant amount of churn in the ecosystem.
tera 2.0 came out in June, and it has a lot of features I want, specifically: much better validation and components. I don't expect for rocket_dyn_templates to get updated for it anytime soon, so I've forked it into rocket_tera.
Forking#
As the name implies, this new crate only supports tera templates. I don't use handlebars or minijinja, and am not interested in maintaining such functionality.
Plus I think slimming it down will make it easier to maintain by reducing the scope, at the cost of a little bit of duplication when someone else inevitably makes rocket_handlebars and rocket_minijinja crates.
My goal is to just keep the existing shape of the crate while keeping it up to date with upstream releases.
The Git repository at https://github.com/legoktm/rocket_tera retains nearly all the split Git history. I've set up trusted publishing, which was quite straightforward.
Migrating#
I've tried to make migrating as straightforward as possible with a pretty minimal set of changes. Upgrading is a two-step process and documented in UPGRADING.md.
In v1, all of the handlebars/minijinja code has been removed, which allows for some API simplification. Notably, templates no longer need a *.tera extension, because we now know that all templates are tera :)
v2 is primarily upgrading from tera v1 to v2, which has its own migration guide. A number of upstream filters and functions were moved to a new tera_contrib crate, so there are features in rocket_tera to seamlessly make it work.
Note: I have only issued RC releases for both, 1.0.0-rc3 and 2.0.0-rc2; I'll wait about a week for any feedback and then cut stable releases.