NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #1522 most downloaded on crates.io
A template engine for Rust based on Jinja2/Django
Last release 7 days ago
11 Sep 2026
Ships fairly regularly
a new release about every 2 weeks
Nearly every release is documented
notes for 59 of the last 60 stable releases
6 versions withdrawn
withdrawn after publishing
10 years old
128 releases · first in 2016
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Fix bugs in filter and get filters
filter and get filtersAllow function calls in math expressions
concat filter to concat arrays or push an element to an arrayAllow concatenation of strings and numbers
Clear local context on each forloop iteration
. that was completely wrongDeprecate register_global_function for register_function
set/set_global not working correctly in macrosregister_global_function for register_functionMark Context::add as deprecated and do not display it in the docs anymore (aka TIL the deprecated attribute)
unreachable! call causing panic in some combination or for loop and specific filtersContext::add as deprecated and do not display it in the docs anymore (aka TIL the deprecated attribute)__tera_context not getting all the available context (set, forloop etc)- Remove stray println
Way fewer allocations and significant speedup (2-5x) for templates with large objects/loops
as_str filterfilter filter was not properly registered (╯°□°)╯︵ ┻━┻
filter filter was not properly registered (╯°□°)╯︵ ┻━┻truncate filter now works correctly on multichar graphemes
truncate filter now works correctly on multichar graphemesAdd a throw global function to fail rendering from inside a template
throw global function to fail rendering from inside a templateRegister now global function so it is available
matching testernow global function so it is availableerror-chainAdd True and False as boolean values to match Python
True and False as boolean values to match Pythonend argument to the truncate filter to override the default ellipsisgroup_by filterfilter filter~ operator to concatenate stringsnow global function to get local and UTC datetimespreserve_order feature of serde_jsonAdd array literal instantiation from inside Tera for set, set_global, kwargs and for loop container
Add break and continue to forloops
break and continue to forloopsRe-export serde_json::Number as well
serde_json::Number as wellRe-export serde_json::Map as well
serde_json::Map as well{{ arr[0] }}, {{ arr[idx] }} etc
thanks to @bootandyContext::insert identical to Context::add to mirror Rust HashMap/BTreeMap syntaxFix macro files importing other macro files not loading properly
slice filter for arraysFix regression when including templates that import macros
pluralize filter for real this time!Fix regression with expressions in comparisons
Tests parentheses are now mandatory if there are arguments (divisibleby 2 -> divisibleby(2))
divisibleby 2 -> divisibleby(2))safe is first.
If you want the old behaviour you will need to start the a chain of filters with | safe as the first oneif x is divisibleby(2) and x > 10% for math expressionsNaiveDateTime work with the date filterpluralize filter now returns the plural suffix for 0 thing as it's apparently what English doesset_global tag that allows you to set something in the global context: meant to be used in forloops where
the normal set would put the value into the loop contextstarting_with, ending_with and containing testsjson_encode, default and sort filtersNothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Add Tera::parse for some niche use-cases
Tera::parse for some niche use-casesHandle path to templates starting with "./"
set or as arguments to filters/macros/global fns- Update chrono
Fix not being able to use variables starting with or, and and not
or, and and not<= and >= not being recognised properly{% set %} instead of panickingFix not being able to call global functions without arguments
Fix bug with {% set %} in forloops
{% set %} in forloopsAdd Send to GlobalFn return type
Send to GlobalFn return typeAdd global functions, see README
Fix bug with section filter swallowing all content after the end tag
Fix bug with variable in loop using starting with the container name
Fix date filter converting everything to UTC
Fix bug in Windows where the glob path was not removed correctly
Tera::extend now also copy filters and testersMacro rendering perf improved and general code cleanup thanks to @Peternator7
date filter work with string input in YYYY-MM-DD formatTera::extend to extend another instance of TeraTera::full_reload that will re-run the glob and parse all templates found.Tera::add_raw_template{s} and Tera::add_template_file{s} part of the public APIRemove value_render and value_one_off, you can now use render and one_off for both values and context
value_render and value_one_off, you can now use render and one_off
for both values and context{% for key, val in my_object %} constructMake variable block like {{ "hey" }} render correctly
{{ "hey" }} render correctlyFix path prefix trimming on Windows
Tera::add_template -> Tera::add_raw_template
Tera::add_template -> Tera::add_raw_templateTera::add_templates -> Tera::add_raw_templatesvalue_render. Thanks to @SilverWingedSeraph for the reportadd_raw_template and add_raw_templates from docs, they were meant for internal use$crate variable, which means you don't need to import anything from Tera to have
them workingContext::extend method to merge a context object into another onePerformance improvements thanks to @wdv4758h
date filter and make it work on a RFC3339 string as well thanks to @philwhinerayAdded Tera::value_one_off to parse and render a single template using a Json value as context
Tera::value_one_off to parse and render a single template using a
Json value as contextAdded #![deny(missing_docs)] to the crate
not is now a Tera keyword#![deny(missing_docs)] to the crateTera::one_off to parse and render a single templatenot operator in conditions to mean falsiness (equivalent to ! in Rust)|| or &&precision arg to round filterdate filter to format a timestamp to a date(time) stringA few breaking changes in this one
A few breaking changes in this one
fn(&str, Option<Value>, Vec<Value>) -> Result<bool> to fn(Option<Value>, Vec<Value>) -> Result<bool>TeraResult export to ResultTera::add_template and Tera::add_templatescompile_templates! macro to try to compile all templates and, in case of errors,
print them and exit the process__tera_context that will pretty print the current contextfilesizeformat, slugify, addslashes, good thing no one noticeddivisibleby and iterable testtry_get_value! macro work outside of TeraFix macros not being found in child templates
Value and to_value (currently from serde-json)Your coding agent can read these notes before it upgrades. Set up the MCP server →