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 now Send + 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!