askama v0.7.0 Release Notes
Release Date: 2018-06-25 // almost 6 years ago-
๐ I'm excited to announce a new release of Askama, the type-safe, compiled Jinja-like template engine for Rust. Among other things, this is what actix-web uses in their TechEmpower benchmarks. Note that this release relies on Rust features first released in 1.26.0.
๐ The most interesting new feature in this release is an overhauled inheritance model:
- ๐
_parent
fields are no longer needed (but still supported for compatibility) - ๐ Supported for multi-layer inheritance has been implemented
- Blocks can now be defined inside other blocks
- The
super()
macro can be used to call parent blocks from inside a block - โ Removes the need for elaborate imports for inheritance across modules
- ๐ Fixes some issues with
extends
paths on Windows
๐ For this release I finally spent some time collecting benchmarks for template engines. The results can be found in this GitHub repository. I was happy to see that Askama performance seems more than competitive compared to popular alternatives.
๐ Smaller improvements in this release:
- โ Add support for
Range
expressions (a..b
; see #95) - โ Add support for
Index
operation (a[b]
; see #95) - ๐ Allow methods to be called on
self
- โ Add support for
loop.first
variable - โ Add a simple
truncate
filter (see #95) - ๐ Matching is more robust thanks to match binding modes (fixes #94)
- ๐
askama::Error
is nowSend + Sync + 'static
- ๐ Renamed lifetime on Rocket integration to prevent conflicts (fixes #88)
- โฌ๏ธ Upgrades to nom 4, syn 0.14 and quote 0.6
๐ Thanks to @Smibu and @dathinab for contributing code to this release, and to everyone else who submitted feedback for their support in further improving Askama.
๐ง I recently started a Patreon page. If you are in a position to support ongoing maintenance and further development of Askama or use it in a for-profit context, please consider supporting my work!
- ๐