PackageTrack
Sign in Get early access

minijinja-contrib

Extra utilities for MiniJinja

2.24.0 7.0M downloads/mo #3796 most downloaded on crates.io mitsuhiko/minijinja

What this package is like to depend on

Last release 11 days ago

12 Aug 2026

Release timing varies

gaps range from 8 days to 3 months

Nearly every release is documented

notes for 60 of 60 stable releases

Nothing withdrawn

no release was ever pulled

3 years old

66 releases · first in 2023

15 releases in the last 12 months

see the full history below

Release timeline

66 releases · Apr 2023 to Aug 2026
2024 2025 2026
Release Pre-release

Releases

latest 60 of 66
  1. 3.0.0-alpha.0 12 Aug 2026 pre-release
    Release notes

    chore(release): 3.0.0-alpha.0

    Open source →
    Release notes
    • Started the MiniJinja 3.0 alpha series. This release contains breaking API changes and is intended for testing.
    • Made mutable State the canonical path for functions, filters, tests, objects, methods, formatters, and nested macro calls. Read-only typed callbacks can continue to use &State; state mutation and dynamic calls now require &mut State. Added typed render-local extensions that persist through includes, blocks, and macros.
    • Removed State::get_or_set_temp_object; use typed render-local extensions instead of object wrappers and interior mutability.
    • Removed Rust APIs deprecated before 3.0: Template::render_and_return_state, Template::render_to_write, Template::eval_to_state, the Filter, Test, TestResult, and ViaDeserialize aliases, value::intern, and the no-op key_interning feature. The no-op loader feature was also removed; loader APIs remain available unconditionally.
    • Made serde optional, explicit, and disabled by default. Rendering APIs now accept Into<Value>; enable the feature and use the value::Serde wrapper for Serde conversion. Disabling the feature fully removes the dependency and no longer substitutes a fallback serialization trait. #528
    • Added first-class tuple literals and public tuple value types in Rust and Go. Tuples now preserve their type through serialization and sequence operations, render like Python tuples, and roundtrip as tuples through the Python binding. JavaScript receives evaluated tuples as arrays. #785
    • Changed sequence and map representations in Rust and Go to use Python-style string quoting, and changed tojson to use Jinja2-compatible separator spacing. #785
    • Changed the MiniJinja-Go module path from /v2 to /v3.
    • Fixed the JavaScript binding's semi_strict undefined behavior spelling.
    • Changed context! and args! to consume values and convert exclusively through Into<Value>; wrap Serde values in value::Serde.
    • Added native Rust tuple conversions and Value::from_pairs. Collecting pairs directly into Value now creates a sequence of tuples rather than a map.
    • Replaced ViaDeserialize with the unified value::Serde adapter for both explicit serialization and function argument deserialization.
    • Changed Value function arguments to reject implicit keyword-argument values. Variadic functions that intentionally capture them can use ValueOrKwargs. #596
    Open source →
  2. 2.24.0 12 Aug 2026
    Release notes

    Release Notes

    • Added the wordwrap filter to the Python bindings. #885
    • Fixed conditional expressions in keyword argument values for Jinja2 compatibility in Rust and Go. #921
    • Fixed context! sorting keys when the preserve_order feature is enabled. #920
    • Limited string repetition to 100 MB in Rust and Go to prevent excessive memory allocations.

    Install minijinja-cli 2.24.0

    Install prebuilt binaries via shell script

    curl --proto '=https' --tlsv1.2 -LsSf https://github.com/mitsuhiko/minijinja/releases/download/2.24.0/minijinja-cli-installer.sh | sh

    Install prebuilt binaries via powershell script

    powershell -ExecutionPolicy Bypass -c "irm https://github.com/mitsuhiko/minijinja/releases/download/2.24.0/minijinja-cli-installer.ps1 | iex"

    Download minijinja-cli 2.24.0

    File Platform Checksum
    minijinja-cli-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum
    minijinja-cli-x86_64-apple-darwin.tar.xz Intel macOS checksum
    minijinja-cli-aarch64-pc-windows-msvc.zip ARM64 Windows checksum
    minijinja-cli-i686-pc-windows-msvc.zip x86 Windows checksum
    minijinja-cli-x86_64-pc-windows-msvc.zip x64 Windows checksum
    minijinja-cli-aarch64-unknown-linux-gnu.tar.xz ARM64 Linux checksum
    minijinja-cli-i686-unknown-linux-gnu.tar.xz x86 Linux checksum
    minijinja-cli-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum
    minijinja-cli-armv7-unknown-linux-gnueabihf.tar.xz ARMv7 Linux checksum
    minijinja-cli-aarch64-unknown-linux-musl.tar.xz ARM64 MUSL Linux checksum
    minijinja-cli-i686-unknown-linux-musl.tar.xz x86 MUSL Linux checksum
    minijinja-cli-x86_64-unknown-linux-musl.tar.xz x64 MUSL Linux checksum
    Open source →
    Release notes
    • Added the wordwrap filter to the Python bindings. #885
    • Fixed conditional expressions in keyword argument values for Jinja2 compatibility in Rust and Go. #921
    • Fixed context! sorting keys when the preserve_order feature is enabled. #920
    • Limited string repetition to 100 MB in Rust and Go to prevent excessive memory allocations.
    Open source →
  3. 2.23.0 06 Aug 2026
    Release notes

    Release Notes

    • Fixed Unicode identifiers in templates rendered through the Python bindings.

    Install minijinja-cli 2.23.0

    Install prebuilt binaries via shell script

    curl --proto '=https' --tlsv1.2 -LsSf https://github.com/mitsuhiko/minijinja/releases/download/2.23.0/minijinja-cli-installer.sh | sh

    Install prebuilt binaries via powershell script

    powershell -ExecutionPolicy Bypass -c "irm https://github.com/mitsuhiko/minijinja/releases/download/2.23.0/minijinja-cli-installer.ps1 | iex"

    Download minijinja-cli 2.23.0

    File Platform Checksum
    minijinja-cli-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum
    minijinja-cli-x86_64-apple-darwin.tar.xz Intel macOS checksum
    minijinja-cli-aarch64-pc-windows-msvc.zip ARM64 Windows checksum
    minijinja-cli-i686-pc-windows-msvc.zip x86 Windows checksum
    minijinja-cli-x86_64-pc-windows-msvc.zip x64 Windows checksum
    minijinja-cli-aarch64-unknown-linux-gnu.tar.xz ARM64 Linux checksum
    minijinja-cli-i686-unknown-linux-gnu.tar.xz x86 Linux checksum
    minijinja-cli-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum
    minijinja-cli-armv7-unknown-linux-gnueabihf.tar.xz ARMv7 Linux checksum
    minijinja-cli-aarch64-unknown-linux-musl.tar.xz ARM64 MUSL Linux checksum
    minijinja-cli-i686-unknown-linux-musl.tar.xz x86 MUSL Linux checksum
    minijinja-cli-x86_64-unknown-linux-musl.tar.xz x64 MUSL Linux checksum
    Open source →
    Release notes
    • Fixed Unicode identifiers in templates rendered through the Python bindings.
    Open source →
  4. 2.22.0 04 Aug 2026
    Release notes

    Release Notes

    • Changed rendering of none and boolean values to None, True, and False for Jinja2 compatibility in Rust and Go. #913
    • Added StringInput for custom Rust filters and functions that transform strings while preserving safety provenance.
    • Fixed safety handling in string-transforming and composing filters to preserve safe strings and escape unsafe fragments in Rust and Go.
    • Fixed the split filter to return a sequence, enabling negative indexing and slicing in Rust and Go. #909
    • Fixed Python-compatible dict methods being shadowed by same-named map keys. #903
    • Fixed loop-local assignments leaking into subsequent iterations in Rust and Go. #912

    Install minijinja-cli 2.22.0

    Install prebuilt binaries via shell script

    curl --proto '=https' --tlsv1.2 -LsSf https://github.com/mitsuhiko/minijinja/releases/download/2.22.0/minijinja-cli-installer.sh | sh

    Install prebuilt binaries via powershell script

    powershell -ExecutionPolicy Bypass -c "irm https://github.com/mitsuhiko/minijinja/releases/download/2.22.0/minijinja-cli-installer.ps1 | iex"

    Download minijinja-cli 2.22.0

    File Platform Checksum
    minijinja-cli-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum
    minijinja-cli-x86_64-apple-darwin.tar.xz Intel macOS checksum
    minijinja-cli-aarch64-pc-windows-msvc.zip ARM64 Windows checksum
    minijinja-cli-i686-pc-windows-msvc.zip x86 Windows checksum
    minijinja-cli-x86_64-pc-windows-msvc.zip x64 Windows checksum
    minijinja-cli-aarch64-unknown-linux-gnu.tar.xz ARM64 Linux checksum
    minijinja-cli-i686-unknown-linux-gnu.tar.xz x86 Linux checksum
    minijinja-cli-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum
    minijinja-cli-armv7-unknown-linux-gnueabihf.tar.xz ARMv7 Linux checksum
    minijinja-cli-aarch64-unknown-linux-musl.tar.xz ARM64 MUSL Linux checksum
    minijinja-cli-i686-unknown-linux-musl.tar.xz x86 MUSL Linux checksum
    minijinja-cli-x86_64-unknown-linux-musl.tar.xz x64 MUSL Linux checksum
    Open source →
    Release notes
    • Changed rendering of none and boolean values to None, True, and False for Jinja2 compatibility in Rust and Go. #913
    • Added StringInput for custom Rust filters and functions that transform strings while preserving safety provenance.
    • Fixed safety handling in string-transforming and composing filters to preserve safe strings and escape unsafe fragments in Rust and Go.
    • Fixed the split filter to return a sequence, enabling negative indexing and slicing in Rust and Go. #909
    • Fixed Python-compatible dict methods being shadowed by same-named map keys. #903
    • Fixed loop-local assignments leaking into subsequent iterations in Rust and Go. #912
    Open source →
  5. 2.21.0 17 Jun 2026
    Release notes

    Release Notes

    • Fixed a panic when comparing two numbers that have no common lossless representation, such as a float against an integer that cannot be represented exactly as f64 (for example 1.0 < 9007199254740993). #904
    • Fixed a stack overflow caused by repeated sequence concatenation. #907
    • Improved performance of iteration over map items. #906

    Install minijinja-cli 2.21.0

    Install prebuilt binaries via shell script

    curl --proto '=https' --tlsv1.2 -LsSf https://github.com/mitsuhiko/minijinja/releases/download/2.21.0/minijinja-cli-installer.sh | sh

    Install prebuilt binaries via powershell script

    powershell -ExecutionPolicy Bypass -c "irm https://github.com/mitsuhiko/minijinja/releases/download/2.21.0/minijinja-cli-installer.ps1 | iex"

    Download minijinja-cli 2.21.0

    File Platform Checksum
    minijinja-cli-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum
    minijinja-cli-x86_64-apple-darwin.tar.xz Intel macOS checksum
    minijinja-cli-aarch64-pc-windows-msvc.zip ARM64 Windows checksum
    minijinja-cli-i686-pc-windows-msvc.zip x86 Windows checksum
    minijinja-cli-x86_64-pc-windows-msvc.zip x64 Windows checksum
    minijinja-cli-aarch64-unknown-linux-gnu.tar.xz ARM64 Linux checksum
    minijinja-cli-i686-unknown-linux-gnu.tar.xz x86 Linux checksum
    minijinja-cli-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum
    minijinja-cli-armv7-unknown-linux-gnueabihf.tar.xz ARMv7 Linux checksum
    minijinja-cli-aarch64-unknown-linux-musl.tar.xz ARM64 MUSL Linux checksum
    minijinja-cli-i686-unknown-linux-musl.tar.xz x86 MUSL Linux checksum
    minijinja-cli-x86_64-unknown-linux-musl.tar.xz x64 MUSL Linux checksum
    Open source →
    Release notes
    • Fixed a panic when comparing two numbers that have no common lossless representation, such as a float against an integer that cannot be represented exactly as f64 (for example 1.0 < 9007199254740993). #904
    • Fixed a stack overflow caused by repeated sequence concatenation. #907
    • Improved performance of iteration over map items. #906
    Open source →
  6. 2.20.0 19 May 2026
    Release notes

    Release Notes

    • Added support for Jinja-style required blocks in Rust and Go, including scoped required parsing compatibility and validation that required blocks only contain whitespace or comments.
    • Added support for chained comparisons (for example a < b < c) in Rust and Go to match Jinja/Python semantics.
    • Fixed dotted integer lookup in the middle of attribute chains (for example foo.0.bar) for Jinja compatibility. #900
    • Fixed compilation with multi_template disabled by gating block-only APIs behind the feature.

    Install minijinja-cli 2.20.0

    Install prebuilt binaries via shell script

    curl --proto '=https' --tlsv1.2 -LsSf https://github.com/mitsuhiko/minijinja/releases/download/2.20.0/minijinja-cli-installer.sh | sh

    Install prebuilt binaries via powershell script

    powershell -ExecutionPolicy Bypass -c "irm https://github.com/mitsuhiko/minijinja/releases/download/2.20.0/minijinja-cli-installer.ps1 | iex"

    Download minijinja-cli 2.20.0

    File Platform Checksum
    minijinja-cli-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum
    minijinja-cli-x86_64-apple-darwin.tar.xz Intel macOS checksum
    minijinja-cli-aarch64-pc-windows-msvc.zip ARM64 Windows checksum
    minijinja-cli-i686-pc-windows-msvc.zip x86 Windows checksum
    minijinja-cli-x86_64-pc-windows-msvc.zip x64 Windows checksum
    minijinja-cli-aarch64-unknown-linux-gnu.tar.xz ARM64 Linux checksum
    minijinja-cli-i686-unknown-linux-gnu.tar.xz x86 Linux checksum
    minijinja-cli-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum
    minijinja-cli-armv7-unknown-linux-gnueabihf.tar.xz ARMv7 Linux checksum
    minijinja-cli-aarch64-unknown-linux-musl.tar.xz ARM64 MUSL Linux checksum
    minijinja-cli-i686-unknown-linux-musl.tar.xz x86 MUSL Linux checksum
    minijinja-cli-x86_64-unknown-linux-musl.tar.xz x64 MUSL Linux checksum
    Open source →
    Release notes
    • Added support for Jinja-style required blocks in Rust and Go, including scoped required parsing compatibility and validation that required blocks only contain whitespace or comments.
    • Added support for chained comparisons (for example a < b < c) in Rust and Go to match Jinja/Python semantics.
    • Fixed dotted integer lookup in the middle of attribute chains (for example foo.0.bar) for Jinja compatibility. #900
    • Fixed compilation with multi_template disabled by gating block-only APIs behind the feature.
    Open source →
  7. 2.19.0 01 Apr 2026
    Release notes
    • Fixed strict undefined behavior for comparison operators (such as ==), string concatenation (~), and undefined needles in the in operator to better match Jinja2. #886 #888
    • Fixed the default filter in strict undefined mode so an explicitly passed undefined fallback argument errors instead of being treated like a missing argument. #887
    Open source →
  8. 2.18.0 15 Mar 2026
    Release notes
    • Added keyword argument support (width, first, blank) to the indent filter for Jinja2 compatibility in Rust and Go. #864
    • Added support for dotted integer lookup (for example foo.0) in Rust and Go for Jinja compatibility. #881
    • Added support for dotted filter and test names (including foo . bar . baz) for Jinja compatibility. #879
    • Fixed string escape handling to preserve unknown escapes (such as \s) for Jinja compatibility in Rust and Go. #880
    • Improved generic performance across template parsing, compilation, and rendering.
    • Fixed minijinja-cabi ownership and pointer-safety issues that could leak mj_value values on error paths.
    • Added high-priority minijinja-cabi APIs for callback-based functions/filters/tests, globals, loaders, path joining, auto-escape configuration, and fuel limits.
    • Switched minijinja-cabi header maintenance to manual source-based syncing and removed cbindgen-based generation tooling.
    • Added lightweight C smoke tests for minijinja-cabi (via make -C minijinja-cabi test) with coverage across all exported C ABI functions, and wired them into top-level testing and CI.
    • Added render_captured and render_captured_to methods on Template which return a Captured type holding the rendered output and the template state.
    • Added into_output method on Captured to consume and return the output string.
    • Deprecated render_and_return_state, eval_to_state, and render_to_write in favor of the new render_captured / render_captured_to / Captured API.
    Open source →
  9. 2.17.1 04 Mar 2026
    Release notes
    • Re-release of 2.17.0 to fix release automation.
    • Switched npm publishing to trusted publishing (OIDC/provenance) and removed token-based auth from CI.
    • Prevented duplicate crates.io publish attempts by skipping slash-prefixed tags in crates publishing.
    Open source →
  10. 2.17.0 03 Mar 2026
    Release notes
    • Added 'c' (character) format type support for format filters and str.format-style formatting. #868
    • Added prebuilt minijinja-cli release targets for aarch64-pc-windows-msvc (Windows ARM64) and armv7-unknown-linux-gnueabihf.
    • Fixed strict and semi-strict undefined handling so string-coercing filter/function arguments also fail for nested Rest<String> and Vec<String> conversions. #877
    • Fixed Python CI/build compatibility with newer maturin by moving stripping from global config to release wheel build arguments.
    Open source →
  11. 2.16.0 20 Feb 2026
    Release notes
    • Added musllinux wheel builds for Python release artifacts.
    • Fixed |escape to honor custom formatters. #861
    • Aligned undefined behavior handling in the Go port with Rust.
    • Removed non-Rust keys and values filters from the Go port for parity. #863
    Open source →
  12. 2.15.1 26 Jan 2026
    Release notes
    • Re-release of 2.15.0 because of a bad release.
    Open source →
  13. 2.15.0 26 Jan 2026
    Release notes
    • Added py.typed marker for PEP 561 typing support in Python bindings. #853
    • Added optional default argument to map.get() method in pycompat. #852
    • Added a go language port. #854
    • Fixed stability guarantees for the |sort filter when using reverse=true. #856
    • Fixed missing SemiStrict undefined mapping in Python bindings. #859
    Open source →
  14. 2.14.0 12 Dec 2025
    Release notes
    • Added support for tuple unpacking in {% set %} statements. #847
    Open source →
  15. 2.13.0 30 Nov 2025
    Release notes
    • Added multi-key support to the |sort filter. #827
    • Added format filter and str.format method for pycompat. #835
    • Fix not undefined with strict undefined behavior. #838
    • Added support for free threading Python. #841
    • Added setLoader and setPathJoinCallback to the JavaScript bindings. #842
    Open source →
  16. 2.12.0 24 Aug 2025
    Release notes
    • Item or attribute lookup will no longer swallow all errors in Python. #814
    • Added |zip filter. #818
    • Fix break_on_hyphens for the |wordwrap filter. #823
    • Prefer error message from unknown_method_callback. #824
    • Ignore .jinja and .jinja2 as extensions in auto escape. #832
    Open source →
  17. 2.11.0 28 Jun 2025
    Release notes
    • Fixed incorrect joining of leading undefineds or empty strings in the |join filter. This was inconsistent with Jinja2 and the filter itself for undefineds in other positions. #794
    • Allow negative arguments to range function and change range to isize. #799
    • Allow isize as argument type. #799
    • MiniJinja now correctly handles \x escape sequences in strings as well as octals. #805
    • Added a new |chain filter. #807
    Open source →
  18. 2.10.2 06 May 2025
    Release notes
    • Fixed an issue with the function bounds that caused the next-generation trait resolver to fail. #787
    Open source →
  19. 2.10.1 05 May 2025
    Release notes
    • Re-release of 2.10.0 because of a broken release process.
    Open source →
  20. 2.10.0 05 May 2025
    Release notes
    • Fix incorrect permissions when --output is used in the CLI. #772
    • Added mj_err_get_debug_info to the C-ABI. #775
    • Modules now capture their output like they do in Jinja2. This means that if you do {% import 'template.j2' as x %} and you then render {{ x }} the output of template.j2 is rendered as if it was included. #778
    • Improved compatibility with Jinja2 for slicing. Negative steps are now correctly handled. Additionally slicing on bytes now correctly handles steps other than 1. #781
    Open source →
  21. 2.9.0 31 Mar 2025
    Release notes
    • Do not panic if too large templates (too many lines or too many columns) are loaded. The error reporting will be wrong in those cases but the templates will load. #742
    • Fixed a bug that caused unknown method callbacks to not get proper error reporting if they cannot find a method. #743
    • Added merge_maps which is a dynamic version of the context! merge feature, and fixed enumeration behavior when non-map objects are attempted to be merged. #745
    • Added mj_value_new_bytes to the C-ABI. #749
    • Added mj_value_as_bytes to the C-ABI to borrow from strings or byte values. #750
    • Fixed buggy mj_err_get_detail and mj_err_get_template_name. These did not work correctly. To fix them the return value now needs to be freed. #754
    • Fix a compilation issue on 32bit systems when AtomicU64 is not available in minijinja-contrib. #755
    • Correctly handle with context and without context for imports. #759
    • The default filter is now also registered as d for Jinja2 compatibility. #763
    • The default filter now accepts a second argument to enable lax defaulting. #764
    • Added a striptags filter to the contrib module. #765
    • Enable pycompat by default for the Python bindings and register the default contrib filters and tests. #767
    Open source →
  22. 2.8.0 03 Mar 2025
    Release notes
    • Added SemiStrict undefined mode that is like strict but allows to be checked for truthiness. Additionally an if expression without an else block will always produce a silent undefined object that never errors for compatibility with Jinja2. #687
    • Make the trait bounds of ViaDeserialize stricter. Now the type can only be constructed if the type implements DeserializeOwned. This is not a new requirement for passing the function to add_function but bad code will now error earlier for better error reporting. #689
    • Raise MSRV to 1.70.
    • The contrib crate now uses a basic xorrand implementation instead of depending on all of the rand module. #696
    • Added temps, a way to stash away temporary state during rendering. #697
    • Fixed a bug that caused the random functions in the contrib crate to not advance the RNG between calls. #698
    • Added Environment.undeclared_variables_in_template and Environnent.undeclared_variables_in_str to Python binding. #699
    • Enable loop_controls for Python in-line with the CLI. #704
    • Fixed a panic when comparing plain objects. #705
    • Added Object::custom_cmp to allow objects to influence how they compare against themselves. This also fixes Python objects in the Python binding not to compare correctly. #707
    • Fixed a bug where undeclared_variables would incorrectly handle variables referenced by macros. #714
    • Fixed a deadlock in the Python binding when multiple threads were rendering from the same environment at once. #717
    • The Python bindings handle __bool__ correctly now for custom objects in if-conditions and filters. #719
    • Fixed a bug where }} caused a syntax error in expressions with open parentheses, braces or brackets. #723
    • Added State::known_variables to return a list of known variables and Environment::globals. #724
    • Fixed an issue with undeclared variables not handling caller. #725
    • Removed unnecessary Filters and Tests traits. They remain as hidden aliases to Function. #726
    • Fixed a bug that caused implicit string concatenation to not correctly handle escapes. #728
    • Implemented constant folding in the code generator. #731
    • Improved error reporting for bad loop recursion calls. #734
    • The engine now uses smaller integers to represent columns, line numbers and addresses. This cuts down on the memory usage needed for debug information. #735
    • Added load_from_path to python. #736
    • Added JavaScript bindings. #737
    Open source →
  23. 2.7.0 28 Jan 2025
    Release notes
    • Removed string interning. #675
    • loop.nextitem is now a lazy operation. This prevents issues when iterating over one-shot iterators combined with {% break %} and it now ensures that the iterator is not running "one item ahead". #677
    • Fixed an issue that caused loop aliasing not to be supported for recursive loops. #678
    • CLI moved from serde_yml to serde_yaml. #684
    • Improved undefined error reporting. Undefined values will now in most cases point to exactly where the error happened. #686
    • Allow newer notify dependency versions (up to 8.x) for the autoreload crate. #688
    Open source →
  24. 2.6.0 08 Jan 2025
    Release notes
    • Added sum filter. #648
    • Added truncate filter to minijinja-contrib. #647
    • Added wordcount filter to minijinja-contrib. #649
    • Added wordwrap filter to minijinja-contrib. #651
    • Some tests and filters now pass borrowed values for performance reasons and a bug was fixed that caused undefined values in strict undefined mode not to work with tests. #657
    • Fixed an error reporting issue for some syntax errors. #655
    • Removed an unsafe code block from the Kwargs type internally which was probably unsafe. #659
    • Fix a regression with latest serde that caused internals to leak out when flattening on value handles is used. #664
    • Added Value::make_object_map to create projections from object into maps, similar to how it was already possible to create iterators that were projected from objects. #663
    • The |items filter will no longer allocate a list and instead return an iterator. #665
    • Fixed a bug that caused lstrip_blocks to act too eager. #674
    Open source →
  25. 2.5.0 10 Nov 2024
    Release notes
    • minijinja-cli now supports preservation of order in maps. #611
    • Fixed an issue where CBOR was not correctly deserialized in minijinja-cli. #611
    • Added a lines filter to split a string into lines.
    • Bytes are now better supported in MiniJinja. They can be created from Value::from_bytes without having to go via serde, and they are now producing a nicer looking debug output. #616
    • Added the missing string filter from Jinja2. #617
    • Reversing bytes and convergint them implicitly to strings will now work more consistently. #619
    • Added type hints for the Python binding and relaxed maturin constraint. #590
    • minijinja-cli now allows the template name to be set to an empty string when --template is used, to allow suppliying a data file. #624
    • Added the missing sameas filter from Jinja2. #625
    • Tests can now support one argument without parentheses like in Jinja2 (1 is sameas 1). #626
    • Added error context for strict undefined errors during template rendering. #627
    • Syntax errors caused by the lexer now include the correct position of the error. #630
    • minijinja-cli now has all features enabled by default as documented (that means also shell completion and ini). #633
    • minijinja-cli now does not convert INI files to lowercase anymore. This was an unintended behavior. #633
    • Moved up MSRV to 1.63.0 due to indexmap. #635
    • Added argument splatting support (*args for variable args and **kwargs for keyword arguments) and fixed a bug where sometimes maps and keyword arguments were created in inverse order. #642
    Open source →
  26. 2.3.1 17 Sep 2024
    Release notes
    • Fixes a regression in PartialEq / Eq in Value caused by changes in 2.3.0. #584
    Open source →
  27. 2.3.0 16 Sep 2024
    Release notes
    • Fixes some compiler warnings in Rust 1.81. #575
    • Fixes incorrect ordering of maps when the keys of those maps were not in consistent order. #569
    • Implemented the missing groupby filter. #570
    • The unique filter now is case insensitive by default like in Jinja2 and supports an optional flag to make it case sensitive. It also now lets one check individual attributes instead of values. #571
    • Changed sort order of Ord to avoid accidentally non total order that could cause panics on Rust 1.81. #579
    • Added a Value::is_integer method to allow a user to tell floats and true integers apart. #580
    Open source →
  28. 2.2.0 26 Aug 2024
    Release notes
    • Fixes a bug where some enums did not deserialize correctly when used with ViaDeserialize. #554
    • Implemented IntoDeserializer for Value and &Value. #555
    • Added filesizeformat to minijinja-contrib. #556
    • Added support for the loop_controls feature which adds {% break %} and {% continue %}. #558
    • Iterables can now be indexed into. It was already possible previously to slice them. This improves support for Jinja2 compatibility as Jinja2 is more likely to create temporary lists when slicing lists. #565
    Open source →
  29. 2.1.2 09 Aug 2024
    Release notes
    • Flush filter and test cache when processing extended template. This fixes a bug that caused the wrong filters to be used in some cases. #551
    Open source →
  30. 2.1.1 31 Jul 2024
    Release notes
    • Added indent parameter to tojson filter. #546
    • Added randrange, lipsum, random, cycler and joiner to minijinja-contrib. #547
    • Added the ability to use &T and Arc<T> as parameters to filters and functions if T is an Object. #548
    • minijinja-cli now also enables the datetime, timezone and rand features. #549
    • Aligned the behavior of the int filter closer to Jinja2. #549
    Open source →
  31. 2.1.0 22 Jul 2024
    Release notes
    • minijinja-cli now supports .ini files. #532
    • Fixed a bug that caused cycle detection to trigger incorrectly when an included template extended from another template. #538
    • Bumped the minimum version of self_cell to 1.0.4. #540
    • MiniJinja will now warn if the serde feature is disabled. This is in anticipation of removing the serde dependency in the future. #541
    • Improved an edge case with State::resolve. It now can resolve the initial template context in macro calls even if no closure has been created. #542
    Open source →
  32. 2.0.3 02 Jul 2024
    Release notes
    • Added new methods to pycompat: str.endswith, str.rfind, str.isalnum, str.isalpha, str.isascii, str.isdigit, str.isnumeric, str.join, str.startswith. #522
    • Added the missing tests boolean, divisibleby, lower and upper. #592
    • minijinja-cli now supports YAML aliases and merge keys. #531
    Open source →
  33. 2.0.2 11 Jun 2024
    Release notes
    • Implemented sequence (+ some iterator) and string repeating with the * operator to match Jinja2 behavior. #519
    • Added the new minijinja::pycompat module which allows one to register an unknown method callback that provides most built-in Python methods. This makes things such as dict.keys work. Also adds a new --py-compat flag to minijinja-cli that enables it. This improves the compatibility with Python based templates. #521
    • Added a new |split filter that works like the .split method in Python. #517
    Open source →
  34. 2.0.1 28 Apr 2024
    Release notes
    • Fixed an issue that caused custom delimiters to not work in the Python binding. #506
    Open source →
  35. 2.0.0 28 Apr 2024
    Release notes

    This is a major update to MiniJinja that changes a lot of core internals and cleans up some APIs. In particular it resolves some limitations in the engine in relation to working with dynamic objects, unlocks potentials for future performance improvements and enhancements.

    It's very likely that you will need to do changes to your code when upgrading, particular when implementing dynamic objects. In short:

    • StructObject and SeqObject are gone. They have been replaced by improved APIs directly on Object. Please refer to the updated documentation to see how these objects behave now. For the most part code should become quite a bit clearer during the upgrade.
    • ObjectKind has been replaced by ObjectRepr. Rather than holding a reference to a StructObject or SeqObject this now is a simple enum that just indicates how that object serializes, renders and behaves.
    • Object no longer uses fmt::Display for rendering. Instead the new Object::render method is used which has a default implementation.
    • The Object trait has been completely transformed and the new type-erased type DynObject has been added to work with unknown objects. This trait has an improved user experience and more flexibility. It's now possible to implement any non-primitive value type including maps with non string keys which was previously not possible.
    • ValueKind is now non exhaustive and got a log of new value types. This resolves various issues in particular in relationship with iterators. As a result of this functions will no longer accidentally serialize into empty objects for example.
    • Value::from_iterator has been replaced by the new Value::make_iterable, Value::make_object_iterable and Value::make_one_shot_iterator. The direct replacement is Value::make_one_shot_iterator but for most uses it's strongly recommended to use one of the other APIs instead. This results in a much improved user experience as it's possible to iterate over such values more than once.
    • The Syntax type has been replaced by the SyntaxConfig type. It uses a builder pattern to reconfigure the delimiters.

    For upgrade instructions read the UPDATING guide.

    Other Changes:

    • Added a new Environment::templates method that iterates over loaded templates. #471
    • Reverse iteration and slicing now return iterables instead of real sequences.
    • The engine no longer reports iterable as sequences.
    • The value iterator returned by Value::try_iter now holds a reference to the Value internally via reference counting.
    • DynObject now replaces Arc<Object>.
    • The debug printing of some objects was simplified.
    • Added the iterable test. #475
    • The parser no longer panics when using dotted assignments in unexpected places. #479
    • The CLI now enables unicode support by default.
    • Value::from_serializable is now Value::from_serialize.
    • Ranges are now iterables and no longer sequences and their maximum number of iterations was raised to 100000. #493
    • Value::from is now implemented for Error as public API to create invalid values. Previously this behavior was hidden internally in the serde support. #495
    • UndefinedBehavior::Strict now acts more delayed. This means that now value.key is defined will no longer fail.
    • Added support for line statements and comments. #503
    • The CLI now accepts --syntax to reconfigure syntax flags such as delimiters. #504
    Open source →
  36. 2.0.0-alpha.0 12 Apr 2024 pre-release

    Nothing published for this version

  37. 1.0.22 06 May 2025
    Release notes
    • Fixed an issue with the function bounds that caused the next-generation trait resolver to fail. #790
    Open source →
  38. 1.0.21 24 Apr 2024
    Release notes
    • Fixed an issue where lstrip_blocks unintentionally also applied to variable expression blocks. #502
    Open source →
  39. 1.0.20 10 Apr 2024
    Release notes
    • Added support for implicit string concatenation for Jinja2 compatibility. #489
    • Added support for sequence concatenation with the plus operator for Jinja2 compatibility. #491
    Open source →
  40. 1.0.18 09 Apr 2024
    Release notes
    • Fixed an endless loop in undeclared_variables. #486
    Open source →
  41. 1.0.17 08 Apr 2024
    Release notes
    • Added support for Option<Into<Value>> as return value from functions. #452
    • Deprecated Value::from_serializable for the improved replacement method Value::from_serialize. #482
    Open source →
  42. 1.0.16 27 Mar 2024
    Release notes
    • Tolerate underscores in number literals. #443
    • Added support for trim_blocks and lstrip_blocks for Jinja2 compatibility. #447
    • Changed API of unstable_machinery. The tokenize function got an extra argument for the WhitespaceConfig. It's however recommended to use the new Tokenizer struct instead. parse_expr was added, the parse function now takes a SyntaxConfig and WhitespaceConfig. #447
    Open source →
  43. 1.0.15 22 Mar 2024
    Release notes
    • Resolved a compiler warning for Rust 1.77. #440
    • Fixed an incorrect error case in call_method. Now UnknownMethod is returned instead of InvalidOperation correctly. #439
    • Added Environment::set_unknown_method_callback which allows a user to intercept method calls on primitives. The motivation here is that this can be used to implement python like methods to improve the compatibility with Jinja2 Python templates. #441
    Open source →
  44. 1.0.14 20 Mar 2024
    Release notes
    • Fixed a bug with broken closure handling when working with nested {% macro %} or {% call %} blocks. #435
    Open source →
  45. 1.0.13 17 Mar 2024
    Release notes
    • minijinja-cli now supports an -o or --output parameter to write into a target file. #405
    • minijinja-cli now accepts the --safe-path parameter to disallow includes or extends from paths not explicitly allowlisted. #432
    • Added support for Error::display_debug_info which displays just the debug info, same way as alternative display on the error does. #420
    • Added the namespace() function from Jinja2 and the ability to assign to it via {% set %}. #422
    • minijinja-autoreload now supports on_should_reload_callback which lets one register a callback to be called just before an auto reload should be performed. #424
    • Added support for Value::from_iterator, IteratorObject and ObjectKind::Iterator. #426
    • Added support for 0b/0o/0x prefixed integer literals for binary, octal and hexadecimal notation. #433
    Open source →
  46. 1.0.12 20 Jan 2024
    Release notes
    • The urlencode filter now correctly skips over none and undefined. #394
    • The dict function now supports merging in of extra arguments. #395
    • Added support for primitive datetimes in the contrib module. #398
    Open source →
  47. 1.0.11 08 Jan 2024
    Release notes
    • Added Environment::compile_expression_owned to allow compiled expressions to be held without requiring a reference. #383
    • Added minijinja-embed crate which provides a simple way to embed templates directly in the binary. #392
    Open source →
  48. 1.0.10 10 Nov 2023
    Release notes
    • Added int and float filters. #372
    • Added integer and float tests. #373
    • Fixed an issue that caused the CLI not to run when the repl feature was disabled. #374
    • Added -n / --no-newline option to CLI. #375
    Open source →
  49. 1.0.9 18 Oct 2023
    Release notes
    • Fixed a memory leak involving macros. Previously using macros was leaking memory due to an undetected cycle. #359
    • The debug function in templates can now also be used to print out the debug output of a variable. #356
    • Added a new stacker feature which allows raising of the recursion limits. It enables monitoring of the call stack via stacker and automatically acquires additional memory when the call stack runs out of space. #354
    Open source →
  50. 1.0.8 17 Sep 2023
    Release notes
    • Large integer literals in templates are now correctly handled. #353
    • Relax the trait bounds of Value::downcast_object_ref / Object::downcast_ref / Object::is and added support for downcasting of types that were directly created with Value::from_seq_object and Value::from_struct_object. #349
    • Overflowing additions on very large integers now fails rather than silently wrapping around. #350
    • Fixed a few overflow panics: dividing integers with an overflow and
    • Exposed missing new functionality for the Python binding. #339
    Open source →
  51. 1.0.7 25 Aug 2023
    Release notes
    • Added support for keep_trailing_newlines which allows you to disable the automatic trimming of trailing newlines. #334
    • Added minijinja-cli which lets you render and debug templates from the command line. #331
    • Macros called with the wrong state will no longer panic. #330
    • Debug output of Value::UNDEFINED and Value::from(()) is now undefined and none rather than Undefined and None. This was an accidental inconsistency.
    • Fixed a potential panic in debug error printing.
    • Added Environment::set_path_join_callback and State::get_template to support path joining. This is for greater compatibility with Jinja2 where path joining was overridable. With this you can configure the engine so that paths used by include or extends can be relative to the current template. #328
    • The default auto-escape detection now accepts .html.j2 as alias for .html as well as for all other choices. In general .j2 as an extension is now generally supported.
    Open source →
  52. 1.0.6 10 Aug 2023
    Release notes
    • Fixed iso datetime formatting not handling negative offsets correctly. #327
    • Re-report Value directly from the crate root for convenience.
    • It's now possible to deserialize from a Value. Additionally the ViaDeserialize<T> argument type was added to support value conversions via serde as argument type. #325
    Open source →
  53. 1.0.5 18 Jul 2023
    Release notes
    • Added the ability to merge multiple values with the context! macro. (#317)
    • Option<T> now accepts none in filters. Previously only undefined values were accepted. This bugfix might have a minor impact on code that relied in this behavior. (#320)
    • Fix a compilation error for minijinja-contrib if the timezone feature is not enabled.
    Open source →
  54. 1.0.4 11 Jul 2023
    Release notes
    • Added the args! macro which can be used to create an argument slice on the stack. (#311)
    • Improved error reporting for missing keyword arguments.
    • Added chrono support to the time filters in the minijinja-contrib crate.
    Open source →
  55. 1.0.3 24 Jun 2023
    Release notes
    • Republished 1.0.2 with fixed docs.
    Open source →
  56. 1.0.2 24 Jun 2023
    Release notes
    • Added TryFrom and ArgType for Arc<str>.
    • Added datetimeformat, dateformat, timeformat and now() to the contrib crate. (#309)
    Open source →
  57. 1.0.1 21 Jun 2023
    Release notes
    • Fixed a bug that caused {% raw %} blocks to accidentally not skip the surrounding tags, causing {% raw %} and {% endraw %} to show up in output. (#307)
    Open source →
  58. 1.0.0 16 Jun 2023
    Release notes
    • Support unicode sorting for filters when the unicode feature is enabled. This also fixes confusing behavior when mixed types were sorted. (#299)

    • Added json5 as file extension for JSON formatter.

    • The autoreload crate now supports fast reloading by just clearing the already templates. This is enabled via set_fast_reload on the Notifier.

    Note: This also includes all the changes in the different 1.0.0 alphas.

    Breaking Changes

    1.0 includes a lot of changes that are breaking. However they should with some minor exceptions be rather trivial changes.

    • Environment::source, Environment::set_source and the Source type together with the source feature were removed. The replacement is the new loader feature which adds the add_template_owned and set_loader APIs. The functionality previously provided by Source::from_path is now available via path_loader.

      Old:

      let mut source = Source::with_loader(|name| ...);
      source.add_template("foo", "...").unwrap();
      let mut env = Environment::new();
      env.set_source(source);
      

      New:

      let mut env = Environment::new();
      env.set_loader(|name| ...);
      env.add_template_owned("foo", "...").unwrap();
      

      Old:

      let mut env = Environment::new();
      env.set_source(Source::from_path("templates"));
      

      New:

      let mut env = Environment::new();
      env.set_loader(path_loader("templates"));
      
    • Template::render_block and Template::render_block_to_write were replaced with APIs of the same name on the State returned by Template::eval_to_state or Template::render_and_return_state:

      Old:

      let rv = tmpl.render_block("name", ctx)?;
      

      New:

      let rv = tmpl.eval_to_state(ctx)?.render_block("name")?;
      
    • Kwargs::from_args was removed as API as it's no longer necessary since the from_args function now provides the same functionality:

      Before:

      // just split
      let (args, kwargs) = Kwargs::from_args(values);
      
      // split and parse
      let (args, kwargs) = Kwargs::from_args(values);
      let (a, b): (i32, i32) = from_args(args)?;
      

      After:

      // just split
      let (args, kwargs): (&[Value], Kwargs) = from_args(values)?;
      
      // split and parse
      let (a, b, kwargs): (i32, i32, Kwargs) = from_args(values)?;
      
    • The testutils feature and testutils module were removed. Instead you can now directly create an empty State and use the methods provided to invoke filters.

      Before:

      let env = Environment::new();
      let rv = apply_filter(&env, "upper", &["hello world".into()]).unwrap();
      

      After:

      let env = Environment::new();
      let rv = env.empty_state().apply_filter("upper", &["hello world".into()]).unwrap();
      

      Before:

      let env = Environment::new();
      let rv = perform_test(&env, "even", &[42.into()]).unwrap();
      

      After:

      let env = Environment::new();
      let rv = env.empty_state().perform_test("even", &[42.into()]).unwrap();
      

      Before:

      let env = Environment::new();
      let rv = format(&env, 42.into()).unwrap();
      

      After:

      let env = Environment::new();
      let rv = env.empty_state().format(42.into()).unwrap();
      
    • intern and some APIs that use Arc<String> now use Arc<str>. This means that for instance StructObject::fields returns Arc<str> instead of Arc<String>. All the type conversions that previously accepted Arc<String> now only support Arc<str>.

    • State::current_call was removed without replacement. This information was unreliably maintained in the engine and caused issues with recursive calls. If you have a need for this API please reach out on the issue tracker.

    • Output::is_discarding was removed without replacement. This is an implementation detail and was unintentionally exposed. You should not write code that depends on the internal state of the Output.

    Open source →
  59. 1.0.0-alpha.4 14 Jun 2023 pre-release
    Release notes
    • Value now implements Ord. This also improves the ability of the engine to sort more complex values in filters. (#295)

    • Arc<String> was replaced with Arc<str> in some of the public APIs where this shined through. Support for more complex key types in maps was added. You can now have tuple keys for instance. (#297)

    Open source →
  60. 1.0.0-alpha.3 12 Jun 2023 pre-release
    Release notes
    • Removed char as a value type. Characters are now represented as strings instead. This solves a bunch of Jinja2 incompatibilities that resulted by indexing into strings. (#292)

    • Marked ErrorKind as #[non_exhaustive].

    • Correctly handle coercing of characters and strings. "w" == "w"[0] is now evaluating to true as one would expect.

    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive