Changelog History
Page 1
-
v0.10.0 Changes
June 30, 2020๐ After 5 months of development, I'm happy to announce the availability of version 0.10 of Askama, the type-safe, compiled Jinja-like template engine for Rust. The major (breaking) change in this release is that the framework integrations, which were previously included in the main crate behind feature flags, have now been moved into 4 separate crates; a new integration with the warp web framework is also shipped in a separate askama_warp crate. If you use an integration, you should now only depend on the integration crate, which re-exports content from the askama crate as well as any integration symbols. Finally, @cetra3 has created a book book which should make navigating the documentation much better.
โฌ๏ธ Upgrade notes:
- Move integration code into askama_actix, askama_gotham, askama_iron and askama_rocket crates
- โก๏ธ Update Gotham integration to version 0.4
Other changes:
- ๐ Move documentation into a new book (#332, thanks to @Cetra)
- โ Add integration for the warp web framework, as an askama_warp crate (#290, thanks to @aeons)
- ๐ Allow
block
s to be nested insideif
,for
andmatch
blocks (#336) - ๐ Support for function calls (#304, thanks to @Senzaki)
- โ Add
urlencode
filter (#305, thanks to @jxs) - 0๏ธโฃ Disable default features in many dependencies to limit the size of the transitive dependency set
- ๐ Fix panic in
truncate
filter (#296, thanks to @danloh)
Thanks to @paolobarbolini, @brunobell, @cipriancraciun, @kyrias, @jeromegn, @NilsIrl and @DusterTheFirst for additional improvements.
-
v0.9.0 Changes
February 24, 2020๐ After 11 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. This has been a long release cycle; mostly I've spent quite a bit of time trying to figure out problems with how to manage Askama's built-in integrations. In the end, 0.9.0 shipped with the integrations problems unsolved, but they were solved shortly thereafter.
โฌ๏ธ Upgrade notes:
- ๐ Move no-receiver
size_hint()
method to a separate trait (#270, thanks to @jbg) - โฌ๏ธ Upgrade Actix-Web integration to Actix-Web 2.0 (#286, thanks to @DCjanus)
- 0๏ธโฃ Default Actix-Web and Gotham integrations to UTF-8 (#219, thanks to @spease)
Other changes:
- โ Add basic support for
{% raw %}
blocks (#231, thanks to @fokinpv) - ๐ Allow referencing
self
as a variable (fixes #207) - โ Add support for boolean literals (#265, thanks to @davebrent)
- โ Add support for character literals (#283, thanks to @siiptuo)
- ๐ Support escaping in string literals (#287, thanks to @siiptuo)
- ๐ Improve interface for askama_escape (#243, thanks to @quadrupleslap)
- ๐ Allow Rust macro calls in more places (#226)
- ๐ Fix a regression in partial inheritance (#224)
- ๐ Improvements to the Actix-Web integration (#223, thanks to @DoumanAsh)
- ๐ Clarify documentation on filter precedence (#230, thanks to @notsimon)
- โ Add documentation on how to deal with recursive data types (#235, thanks to @drahnr)
- โ Add documentation on nesting
Template
types (#218, thanks to @victe) - ๐ Improve documentation for Actix-Web and Gotham integrations (#250, thanks to @bardiharborow)
- โฌ๏ธ Upgrade to nom 5 and non-macro parser combinators
- โฌ๏ธ Upgrade to syn/quote/proc_macro2 version 1.0
Thanks to @kazimuth and @bardiharborow for additional internal improvements.
- ๐ Move no-receiver
-
v0.8.0 Changes
February 20, 2019๐ 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 theEscaper
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
-
v0.7.2 Changes
October 08, 2018๐ After two months, I'm happy to announce the 0.7.2 release of Askama, the type-safe, compiled Jinja-like template engine for Rust! Despite the small version number increase (because this release should be fully backwards compatible with earlier 0.7 releases), there's a good amount of feature in this release. Happily, I can say that for the first time, all of the improvements in this release are due to @botika spending a lot of time on improving Askama over the past months, for which I owe them many thanks! Let's dive in:
- ๐ Custom syntax support: in response to a bug reporter who wanted to generate LaTeX with Askama (#121), it is now possible to use custom block delimiters in your Askama templates. Read the documentation for more information on how to define and use custom syntaxes. Thanks to @botika for spending a lot of time on getting this just right.
- โ Added a number of built-in filters:
abs
,capitalize
,center
andwordcount
- ๐ Fixed support for range-based for-loops (#117) by specializing the code generator
- ๐ Fixed operator precedence issues with loop attributes (like
index
) - ๐ Fixed a number of edge cases in macro scope resolution
-
v0.7.1 Changes
July 23, 2018๐ Some nice new features are now available as part of Askama 0.7.1. The most important one is the ability to search multiple directories for template files. This works by adding an
askama.toml
file to the crate root and specifying the search directories in there (see the documentation). Now that there is a configuration mechanism, this may unlock other potential features that rely on some way to specify out-of-band configuration.๐ This release also adds optional support for actix-web. If you enable the
with-actix-web
feature,Template
derives will include animpl
for actix-web'sResponder
trait, so that you can trivially return template context structs from actix-web handlers.- โ Add support for multiple template directories (thanks to @mashedcode)
- โ Add
impl
for actix-webResponder
trait (thanks to @ryanmcgrath) - โ Add linebreaks and linebreaksbr filters (thanks to @Aaronepower)
- ๐ Allow
Template
users to inspect templateextension()
(thanks to @ryanmcgrath) derive(Template)
is no longer restricted to named field struct types
-
v0.7.0 Changes
June 25, 2018๐ 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!
- ๐
-
v0.6.4 Changes
April 30, 2018- โ Added support for unary operators
!
and-
(fixes #83)
- โ Added support for unary operators
-
v0.6.3 Changes
April 30, 2018๐ Fixed a regression introduced in 0.6.2 with interacting filter expressions and statements.
-
v0.6.2 Changes
April 18, 2018 -
v0.6.1 Changes
April 18, 2018