NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io
crates.io, #4562 most downloaded on crates.io
Shared code for Askama
Latest stable
0.12.2
Last release 5 years ago
no release in 18 months
Release timing varies
gaps range from 2 weeks to 1.1 years
Most releases are documented
notes for 17 of 22 stable releases
1 version withdrawn
withdrawn after publishing
9 years old
23 releases · first in 2017
Drag across the ruler to compare, or tap a release to open it.
Nothing published for this version
Nothing published for this version
Remove support for deprecated _parent field
After 13 months of development, we're happy to announce the 0.12.0 release of Askama, the type safe, compiled Jinja-like template engine for Rust. For this release, @Kijewski contributed most of the changes -- @vallentin and @djc are the other team members. This releases comes with integrations for Actix-Web 4, Axum 0.6, Gotham 0.7, hyper 0.14, Tide 0.16 and Warp 0.3. We removed our Iron integration, since this framework no longer seems to be actively maintained.
suppress_whitespace config option (#664, thanks to @GuillaumeGomez)minimize config for whitespace and add handling of ~ in the parser (#673, thanks to @GuillaumeGomez){% match %} (#616)Display (#654){% endmacro name %} (#681, thanks to @Eijebong)_parent field (#613)ext argument in integrations (#632)capitalize filter Unicode-aware (#652, thanks to @Kl4rry)#[template] attribute is used exactly once (#603)panic!() in loop.cycle([]) (#617)std::error::Error::source() (#655)unsafe code from askama_escape (#665)&str instead of &[u8] (#541)impl From<T: Template> for hyper::Body (#776, thanks to @valkum)Your coding agent can read these notes before it upgrades. Set up the MCP server →
Nothing published for this version
Tag askama version 0.11.1
Tag askama version 0.11.1
After almost 18 months of development, I'm happy to finally announce the 0.11.0 release of Askama, the type-safe, compiled Jinja-like template engine
After almost 18 months of development, I'm happy to finally announce the 0.11.0 release of Askama, the type-safe, compiled Jinja-like template engine for Rust. Importantly, during this release cycles two new members joined the Askama team (consisting of just @djc at the start of this release): @vallentin and @Kijewski, who both contributed many well-designed improvements to this release. Contributors added integrations for the Axum and Tide web frameworks to our existing set of integrations for Rocket, Actix-Web, Warp and Gotham.
Perhaps the most visible change in this release is the redefined Template trait which now has a DynTemplate counterpart rather than the SizedTemplate used in the previous release (see #579). That said, the template language itself has grown a number of helpful features (as detailed below), while the code generator can now avoid many compilation issues due to better heuristics. We also improved whitespace handling to be more correct, and made several dependencies optional such that using default-features = false on any of the Askama crates should minimize dependencies if so desired.
Changes:
compile_error!() (#373, thanks to @msrd0 for improving this in #374):: (#393)Bug fixes:
template attributes (#549)Template language:
let and for (#506)let and for (#509)loop.cycle() expressions (#517)for-else blocks (#518)break and continue blocks (#519)raw blocks (#546)set alias for let blocks (#402)Filters:
urlencode filter to be usable for URL segments, add urlencode_path (#384, thanks to @JakubValtar)paragraphbreaks filter (#467, thanks to @mbuscemi)format filter that swaps the first two arguments (#345, thanks to @couchand)escape filter (#560)info_f64 and into_isize filters to take references (#359, thanks to @yshui)Integrations:
Thanks go to @freddyb, @edg-l, @BafDyce, @xfix, @mkj, @robjtede, @technic, @JakeChampion, @SamJakob, @jplatte, @Restioson for their contributions, too.
Tag askama version 0.10.5
Tag askama version 0.10.5
Tag askama version 0.10.4
Tag askama version 0.10.4
Tag askama version 0.10.3
Tag askama version 0.10.3
Tag askama version 0.10.2
Tag askama version 0.10.2
Nothing published for this version
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 fo
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 which should make navigating the documentation much better.
Upgrade notes:
Other changes:
blocks to be nested inside if, for and match blocks (#336)urlencode filter (#305, thanks to @jxs)truncate filter (#296, thanks to @danloh)Thanks to @paolobarbolini, @brunobell, @cipriancraciun, @kyrias, @jeromegn, @NilsIrl and @DusterTheFirst for additional improvements.
Nothing published for this version
After 11 months of development, I'm happy to announce the availability of version 0.9 of Askama, the type-safe, compiled Jinja-like template engine fo
After 11 months of development, I'm happy to announce the availability of version 0.9 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:
size_hint() method to a separate trait (#270, thanks to @jbg)Other changes:
{% raw %} blocks (#231, thanks to @fokinpv)self as a variable (fixes #207)Template types (#218, thanks to @victe)Thanks to @kazimuth and @bardiharborow for additional internal improvements.
The use of build scripts is no longer needed and has been deprecated (#199, thanks to @de-vri-es)
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:
Template::extension() is now a static method (#127, thanks to @ubnt-intrepid)_parent field is now deprecated (thanks to @botika)Other changes:
into_response() method for actix-web users (#205, thanks to @ZizhengTai )let and for blocks (#187, thanks to @yossyJ)yaml filter (#192)indent filter (#131, thanks to @casey)isize and f64 filters (#146, thanks to @tizgafa)filesizeformat filter (#161, thanks to @tizgafa)loop.last variable (#194, thanks to @yossyJ)Template directly (#147, thanks to @ubnt-intrepid)self in expressions (#207)stderr instead of stdout{% let %} blocksAfter 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 ve
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:
abs, capitalize, center and wordcountindex)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 fi
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 an impl for actix-web's Responder trait, so that you can trivially return template context structs from actix-web handlers.
impl for actix-web Responder trait (thanks to @ryanmcgrath)Template users to inspect template extension() (thanks to @ryanmcgrath)derive(Template) is no longer restricted to named field struct typesI'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-w
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)super() macro can be used to call parent blocks from inside a blockextends paths on WindowsFor 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:
Range expressions (a..b; see #95)Index operation (a[b]; see #95)selfloop.first variabletruncate filter (see #95)askama::Error is now Send + Sync + 'staticThanks 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!
Some great bug reports came in after the 0.6.0 and 0.6.1 releases last week, which I fixed:
Some great bug reports came in after the 0.6.0 and 0.6.1 releases last week, which I fixed:
This is a quick bugfix release for #73: due to an unsupported way of including syn, Askama had a run-time dependency on proc-macro, which didn't work
This is a quick bugfix release for #73: due to an unsupported way of including syn, Askama had a run-time dependency on proc-macro, which didn't work well in some scenarios. Thanks to @dtolnay for the bug fix.
Finally, another release of Askama, the type-safe compiled Jinja-like Rust templating library. The biggest feature in this release is the support for
Finally, another release of Askama, the type-safe compiled Jinja-like Rust templating library. The biggest feature in this release is the support for match blocks, making it possible to do pattern matching in templates. An example is provided in the documentation.
Responder which was broken in the 0.5.0 releaseThanks to everyone who has contributed to Askama!
Discussing the 0.4.0 release made me think I should quickly make one further change: inferring the escape mode from the template path, or a specified
Discussing the 0.4.0 release made me think I should quickly make one further change: inferring the escape mode from the template path, or a specified extension if you're using the source attribute. This means escaping is now only on by default for templates with a html, htm, or xml extension. In addition, this release escapes more characters, according to the OWASP recommendations.
If you spent time making changes for the 0.4.0 upgrade already, sorry about the churn! I believe this minimizes boilerplate and hopefully doesn't introduce too much magic.
There are some breaking changes compared to the 0.3.0 series:
Roughly six months after announcing the first public version of Askama, 0.4.0 feels like a large update.
There are some breaking changes compared to the 0.3.0 series:
&, < and > are replaced with HTML character entities by default (see #23)Error and Result typesOther noteworthy new features include:
_parent to refer to fields from the parent contextTemplate implementations now automatically implement DisplaySpecial thanks to those who have contributed to this release, in particular @anowell and @defyrlt.
Please post your feedback or questions as an issue or join the chat!
One column per quarter.