0.8.0
After 3 months of development, I'm happy to announce the availability of version 0.8 of Askama, the type-safe, compiled Jinja-like template engine for Rust -- all the more so because it has taken me way too long to push out this release due to an exceedingly busy period in my personal life.
Askama 0.8 is up to 2 times as fast as 0.7.2, thanks to performance improvements contributed by @botika and @YossyJ. For comparisons to other template engines, please look at the template benchmarks repo. The largest feature this time around is the newly added support for pluggable escape engines and formats. By adding just a few lines to the askama.toml
configuration file and writing a simple implementation of the Escaper
trait, Askama can use custom code for escaping, such as for different formats (LateX or shell) or with even more optimized performance (using SIMD).
Upgrade notes:
- The use of build scripts is no longer needed and has been deprecated (#199, thanks to @de-vri-es)
- Upgraded the Rocket integration to Rocket 0.4
Template::extension()
is now a static method (#127, thanks to @ubnt-intrepid)- Use of the
_parent
field is now deprecated (thanks to @botika)
Other changes:
- Upgraded the Rocket integration to Rocket 0.4
- Added optional support for Gotham integration (#177, thanks to @rakenodiax)
- Added an
into_response()
method for actix-web users (#205, thanks to @zizhengtai ) - Add support for tuple destructuring in
let
andfor
blocks (#187, thanks to @YossyJ) - Added optional
yaml
filter (#192) - Added an
indent
filter (#131, thanks to @casey) - Added
isize
andf64
filters (#146, thanks to @tizgafa) - Added a
filesizeformat
filter (#161, thanks to @tizgafa) - Added support for the
loop.last
variable (#194, thanks to @YossyJ) - Allow matching enum struct variants (#182, thanks to @mcarton)
- Allow templates to work without importing
Template
directly (#147, thanks to @ubnt-intrepid) - Allow referencing
self
in expressions (#207) - Fixed problems with unescaped expressions (#107 and #132)
- Fixed off-by-one error in escaping function (#138, thanks to @benjunmun)
- Send debug output to
stderr
instead ofstdout
- Document assignment using
{% let %}
blocks