handlebars
Handlebars templating implemented in Rust.
6.4.4
89M downloads/mo
#866 most downloaded on crates.io
sunng87/handlebars-rust
What this package is like to depend on
Last release 11 days ago
12 Aug 2026
Release timing varies
gaps range from 3 weeks to 10 months
Most releases are documented
notes for 97 of 157 stable releases
3 versions withdrawn
withdrawn after publishing
12 years old
187 releases · first in 2014
5 releases in the last 12 months
see the full history below
Release timeline
187 releases · Dec 2014 to Aug 2026Releases
latest 60 of 187-
6.4.412 Aug 2026Release notes
Open source →What's Changed
- test: add shared TestHandlebars helpers and adopt across render tests by @sunng87 in #771
- chore(deps-dev): bump websocket-driver from 0.7.4 to 0.7.5 in /playground/www by @dependabot[bot] in #772
- chore(deps-dev): bump fast-uri from 3.1.2 to 3.1.4 in /playground/www by @dependabot[bot] in #774
- chore(deps-dev): bump shell-quote from 1.8.4 to 1.10.0 in /playground/www by @dependabot[bot] in #777
- chore(deps-dev): bump webpack-dev-server from 5.2.5 to 5.2.6 in /playground/www by @dependabot[bot] in #776
- chore(deps-dev): bump webpack-dev-server from 5.2.6 to 6.0.0 in /playground/www by @dependabot[bot] in #779
- chore(deps-dev): bump fast-uri from 3.1.4 to 3.1.5 in /playground/www by @dependabot[bot] in #780
- chore: disable preseve order feature by default by @sunng87 in #783
Full Changelog: v6.4.3...v6.4.4
Release notes
Open source →- [Changed] We have to revert
preserve_json_orderas a default feature. Users who need this can still enable it for handlebars-rust, or enablepreserve_orderfor you serde_json.
-
6.4.312 Jul 2026Release notes
Open source →What's Changed
- chore: drop pprof dev-dependency to remove vulnerable quick-xml by @sunng87 in #769
- chore(deps-dev): bump ws from 8.18.0 to 8.21.0 in /playground/www by @dependabot[bot] in #770
- feat: add preserve_json_order feature flag by @sunng87 in #767
- fix: handle leading tilde on
else ifchain tags by @sunng87 in #768
Full Changelog: v6.4.2...v6.4.3
Release notes
Open source →- [Fixed] Panic when using whitespace omission (
~) on anelse ifchain tag, e.g.{{~else if cond}}. The leading tilde is now handled consistently with{{~else}}[#766] - [Added]
preserve_json_orderfeature flag that gatesserde_json'spreserve_orderfeature. Enabled by default to keep insertion-order key iteration; disable withdefault-features = falseto restore alphabetical JSON object key ordering. [#767] - [Changed] Drop the
pprofdev-dependency (and itsinferno/quick-xmltransitive deps) from benchmarks. This removes the vulnerablequick-xml0.26 transitive dependency ([#764], [#765]); the upgrade was blocked upstream becausepprofpinsinferno0.11. Benchmarks now use plain criterion without in-repo flamegraph generation.
-
6.4.224 Jun 2026Release notes
Open source →- [Fixed] Access to local variables like
@key,@index, etc. in#withand partial block [#758] - [Fixed] Preserve ordering when iterating an array context inside a partial that receives hash parameters [#760]
- [Changed] Enable serde_json
preserve_orderfeature. JSON objects are now iterated in insertion order (matching Handlebars.js semantics) instead of alphabetical key order. This fixes index-key ordering for array contexts converted into objects by partial hash parameters (e.g."10"no longer sorts before"2").
- [Fixed] Access to local variables like
-
6.4.116 May 2026Release notes
Open source →- [Fixed] Allow using
@partial-blockwith block include and fallback template [#752]
- [Fixed] Allow using
-
6.4.002 Jan 2026Release notes
Open source →What's Changed
- fix: allow colons in identifier by @sunng87 in #706
- docs: remove incorrect parameters from docstring by @vsbits in #707
- chore(deps-dev): bump http-proxy-middleware from 2.0.7 to 2.0.9 in /playground/www by @dependabot[bot] in #709
- expose DirectorySourceOptionsBuilder & added doc example by @markwellis in #710
- chore(deps): update pprof requirement from 0.14 to 0.15 by @dependabot[bot] in #714
- chore(deps-dev): bump webpack-dev-server from 5.1.0 to 5.2.1 in /playground/www by @dependabot[bot] in #715
- chore(deps): update criterion requirement from 0.5 to 0.6 by @dependabot[bot] in #712
- feat: Added dynamic partial blocks by adding support for empty block closing tags by @henriquecolini in #713
- feat: Export WriteOutput in public API by @SuchAFuriousDeath in #717
- chore(deps): bump on-headers and compression in /playground/www by @dependabot[bot] in #718
- chore(deps): update criterion requirement from 0.6 to 0.7 by @dependabot[bot] in #719
- feat: else support for boolean helpers by @exoego in #720
- Fix the build with
-Zminimal-versionsby @ppentchev in #723 - Add Ability to Unregister Helpers by @Lepidopteran in #725
- chore(deps-dev): bump node-forge from 1.3.1 to 1.3.2 in /playground/www by @dependabot[bot] in #727
- Option to enable recursive resolution of variables by @wez in #730
- chore(deps): update criterion requirement from 0.7 to 0.8 by @dependabot[bot] in #728
- chore(deps): bump qs and express in /playground/www by @dependabot[bot] in #731
- fix: correct partial-block render by @sunng87 in #732
New Contributors
- @vsbits made their first contribution in #707
- @markwellis made their first contribution in #710
- @henriquecolini made their first contribution in #713
- @SuchAFuriousDeath made their first contribution in #717
- @exoego made their first contribution in #720
- @ppentchev made their first contribution in #723
- @Lepidopteran made their first contribution in #725
- @wez made their first contribution in #730
Full Changelog: v6.3.2...v6.4.0
Release notes
Open source →- [Fixed] Reimplement partial-block, fixed partial-block resolution issues [#732]
- [Added]
recursive_lookupmode [#730]
-
6.3.216 Mar 2025Release notes
Open source →What's Changed
- fix: partial context with literal parameters by @sunng87 in #695
- feat: correct implementation of partial block by @sunng87 in #699
Full Changelog: v6.3.1...v6.3.2
-
6.3.109 Feb 2025Release notes
Open source →What's Changed
- Fix documentation typo by @Flamenco in #690
- fix: reimplement partial context as block params by @sunng87 in #694
New Contributors
Full Changelog: v6.3.0...v6.3.1
-
6.3.005 Jan 2025Release notes
Open source →What's Changed
- chore(deps): update thiserror requirement from 1 to 2 by @dependabot in #683
- chore(deps): update pprof requirement from 0.13 to 0.14 by @dependabot in #684
- make "and" and "or" accept any number of parameters by @lovasoa in #687
- fix(#666): Add builder for non-exhaustive structs by @hadizamani021 in #688
New Contributors
- @hadizamani021 made their first contribution in #688
Full Changelog: v6.2.0...v6.3.0
Release notes
Open source →- [Added] Builders for some non-exhaustive structs [#688]
- [Changed]
andandorhelper now accepts multiple parameters [#687] - [Changed] MSRV is now 1.73
-
6.2.026 Oct 2024Release notes
Open source →What's Changed
- chore(deps): bump serve-static and express in /playground/www by @dependabot in #675
- chore(deps): bump send and express in /playground/www by @dependabot in #676
- fix: improved number compare between different types by @sunng87 in #679
- chore(deps): bump cookie and express in /playground/www by @dependabot in #680
- feat: add @index for object iteration by @sunng87 in #682
Full Changelog: v6.1.0...v6.2.0
Release notes
Open source →- [Added]
@indexvariable for object iteration [#682] - [Changed] improve number comparison between different types [#679]
-
6.1.006 Sep 2024Release notes
Open source →What's Changed
- docs: fix code examples formatting by @mrnossiom in #668
- chore(deps-dev): bump webpack from 5.76.0 to 5.94.0 in /playground/www by @dependabot in #671
- implement floating point and string comparisons by @lovasoa in #673
New Contributors
- @mrnossiom made their first contribution in #668
Full Changelog: v6.0.0...v6.1.0
-
6.0.020 Jul 2024Release notes
Open source →- [Fixed] Various indent issue with partials, empty lines and helpers [#646] [#654] [#658]
- [Fixed] Bug when accessing nested path [#651]
- [Added] New public access to
PathSeg[#656] - [Added] New API to set single block params in
BlockContext[#655] - [Added]
From<RenderError>forRenderErrorReason[#644] - [Changed] Add
non_exhaustiveattribute to all public memebers [#647] - [Changed]
RenderContextAPI and improved performance for partial rendering [#661] [#662] - [Changed] Improved error messsage for template parsing [#638]
-
5.1.224 Mar 2024Release notes
Open source →- [Changed] Improved error message and syntax rule naming [#638]
- [Changed] Updated
heckto 0.5 [#635]
-
5.1.118 Jan 2024 withdrawn -
5.1.017 Jan 2024 -
5.0.031 Dec 2023Release notes
Open source →- [Added] public mutable access to local variables in
BlockContext[#533] - [Changed] Simplified lifetime specifiers for
Helper,ScopedJsonand some other related types and functions. [#532] - [Changed] Updated
TemplateErrorto reduce its size. Direct field access is removed in favor of access methods - [Changed] Introducing
RenderErrorReasonfor typed render error - [Changed] Changed
register_template_directoryapi for more customizations #[610] - [Changed] Updated rust-embed to 8.0
- [Added] public mutable access to local variables in
-
5.0.0-beta.523 Sep 2023 pre-releaseNothing published for this version
-
5.0.0-beta.404 Sep 2023 pre-releaseNothing published for this version
-
5.0.0-beta.301 Sep 2023 pre-releaseNothing published for this version
-
5.0.0-beta.220 May 2023 pre-releaseNothing published for this version
-
5.0.0-beta.125 Nov 2022 pre-releaseNothing published for this version
-
4.5.009 Nov 2023Nothing published for this version
-
4.4.001 Sep 2023Nothing published for this version
-
4.3.711 May 2023Nothing published for this version
-
4.3.621 Dec 2022Nothing published for this version
-
4.3.505 Oct 2022Nothing published for this version
-
4.3.411 Sep 2022Release notes
Open source →- [Added] New
write_fmtfunction forOutput[#522] - [Added]
reason()method forTemplateErrorto access underlying reason, this replaces original direct.reasonaccess. - [Changed] Direct access to
TemplateError'sreasonfield is depreacted will be removed in future.
- [Added] New
-
4.3.320 Jul 2022Release notes
Open source →- [Fixed] Disable partial expression indentation with
{{~> partial}}to bring behavior closer in line with original javascript version. [#518] - [Fixed] Support for using partial context together with partial parameters [#520]
- [Fixed] Disable partial expression indentation with
-
4.3.214 Jul 2022Release notes
Open source →- [Added] Render functions that reuse
Contextfor customstd::io::Write:render_with_context_to_writeandrender_template_with_context_to_write
- [Added] Render functions that reuse
-
4.3.109 Jun 2022 -
4.3.018 May 2022Release notes
Open source →- [Changed] update MSRV to 1.57 as rhai requires
- [Fixed] Reimplemented indent support for partial expression
{{> partial}}, which is introduced in 4.2.0. The new implementation is aligned with original javascript version, that every text line generated from partial are indented as{{> partial}}does.prevent_indentwill turn-off this feature. [#505] - [Changed] changed error support library from quick_error to thiserror
-
4.2.209 Mar 2022Release notes
Open source →- [Fixed] Block param scope leaked into partials [#496]
- [Changed] Use Rust 2021 edition and update MSRV to 1.56
-
4.2.117 Jan 2022Release notes
Open source →- [Fixed] Nested partial
@partial-blockreferencing issue [#488] - [Fixed] Docs generation on docs.rs for
rust-embedfeature
- [Fixed] Nested partial
-
4.2.005 Jan 2022Release notes
Open source →- [Added] RustEmbed support for loading templates from [#484]
- [Fixed] Parser support for variables begins with digit [#479]
- [Changed] Keep indent whitespaces for partial expression
{{> partial}}as default in handlebarsjs. A new optionprevent_indentis provided onHandlebarsto turn off this behaviour. [#486] - [Changed] Update MSRV to 1.51 due to dependency changes
-
4.1.603 Dec 2021 -
4.1.517 Nov 2021 -
4.1.405 Nov 2021 -
4.1.310 Sep 2021Release notes
Open source →- [Added]
@lastvariable foreachblock with object [#466] - [Fixed] Missing whitespaces behind expression [#468]
- [Added]
-
4.1.210 Aug 2021Release notes
Open source →- [Added] Support for generic types in
handlebars_helper!. - [Added] Getter and setter for rhai
Enginefrom registry. - [Fixed] Improve doc for
dev_modethat it has to be enabled before adding templates.
- [Added] Support for generic types in
-
4.1.131 Jul 2021Release notes
Open source →- [Changed] Update rhai to 1.0 [#455]
- [Fixed] Empty line stripping for partial include statement, and other corner cases [#458]
-
4.1.004 Jul 2021Release notes
Open source →- [Added] export
StringOutputas requested in #442 - [Changed] strict mode now applies to our helper macro
handlebars_helper!and built-in helpers based on it. - [Fixed] Line stripping feature for standalone statment introduced in #404 is now aligned with handlebarsjs. #448
- [Added] export
-
4.0.115 Jun 2021 -
4.0.025 May 2021Release notes
Open source →- [Added]
dev_modefor registry: templates and scripts loaded from file are always reloaded when dev mode enabled [#395] - [Added] Registry is now
Clone[#395] - [Added] New built-in helper
len[#421] - [Changed] Updated
rhaito 0.19 and then 0.20 [#391] - [Changed]
#eachhelper now renders else block for non-iterable data [#380] - [Changed]
TemplateErrorandScriptErroris now a cause ofRenderError[#395] - [Changed] Empty lines around block helpers are now stripped [#404]
- [Changed] Breaking
RenderContext::get_partialnow returnsOption<&Template> - [Changed] Breaking Capitalize names like
HtmlExpressionandIoErrorbased on clippy recommendations [#424] - [Changed] Breaking Improved return type of
call_innerfromHelperDefto avoid misleading [#437] - [Fixed] reference starts with
null,trueandfalsewere parsed incorrectly [#382] - [Fixed] dir source path separator bug on windows [#389] [#405]
- [Fixed] stack overflow with nested
@partial-block[#401] - [Fixed] value access issue when upper block has a base value [#419]
- [Fixed] escape rules for Json string literal [#423]
- [Fixed] Breaking zero-arity subexpressions support [#433]
Zero-arity subexpression no longer resolved as variable. The behaviour is now aligned with handlebarsjs.
For instance,
{{(parent)}}can no longer accessparentfield of the context object, use{{lookup this "parent"}}instead. This change applies to partial inclusion, too. - [Removed] Breaking option to disable source map is removed [#395]
- [Removed] Breaking
TemplateFileErrorandTemplateRenderErrorare removed and merged intoTemplateErrorandRenderError[#395]
- [Added]
-
4.0.0-beta.228 Mar 2021 pre-releaseNothing published for this version
-
4.0.0-beta.116 Mar 2021 pre-releaseNothing published for this version
-
3.5.503 May 2021 -
3.5.427 Mar 2021 -
3.5.320 Feb 2021 -
3.5.229 Dec 2020Release notes
Open source →- [Fixed] allow
/as trailing separator on Windows, backported from master [#405]
- [Fixed] allow
-
3.5.125 Oct 2020 -
3.5.023 Sep 2020Release notes
Open source →- [Changed]
#eachhelper now renders else block for non-iterable data [#380] - [Fixed] reference starts with
null,trueandfalsewere parsed incorrectly [#382]
- [Changed]
-
3.4.014 Aug 2020Release notes
Open source →- [Added] Debug log that can be turned on by using envlog or other implementation, to trace data resolution during rendering [#369]
- [Fixed] Derived value as block context base value [#343, #353]
- [Fixed] Partial name aligned with handlebars.js, added support for
., escape[]and string''name - [Changed] HTML escape aligned with handlebars.js, added
=,\and ``` [#366] - [Changed] Update rhai to 0.18 [#370]
- [Fixed] Result of simple helper is now escaped [#373]
-
3.3.018 Jul 2020Release notes
Open source →- [Added] Added two new APIs to reuse
Contextfor rendering [#352] - [Changed] Update rhai to 0.17 [#354]
- [Fixed] Fixed mustache.js html expression support, which is "&" instead of "$"
- [Added] Added two new APIs to reuse
-
3.2.128 Jun 2020 -
3.2.028 Jun 2020Release notes
Open source →- [Added] API to register an pre-processed template [#331]
- [Added] Helper macro now has support for named argument and helepr hash [#338]
- [Added] Added support for
$expression that is part of mustache.js [#339] - [Changed] Update rhai to 0.15 [#330]
- [Fixed] else block for
each[#344]
-
3.1.001 Jun 2020Release notes
Open source →- [Added] All new rhai script helper
- [Added] multiple parameter support for log helper
- [Fixed] helper lookup priority
- [Changed]
SendandSyncare not required for RenderContext local helper [#319] - [Fixed] partial block when using path as name [#321]
-
3.1.0-beta.212 Apr 2020 pre-releaseNothing published for this version
-
3.1.0-beta.111 Mar 2020 pre-releaseNothing published for this version
-
3.0.125 Jan 2020 -
3.0.024 Jan 2020Release notes
Open source →- [Changed] Added lifetime specifier to
Handlebarsstructure allowing helper definition to have non-static borrowed data #282 - [Changed] Removed hashbrown dependency #279
- [Changed] Features has been reorganized.
dir_sourcewere turned off by default. #289 - [Changed] Refactored
RenderContextAPI to improve performance up to 5x over2.0 - [Added] Add new
BlockContextAPI for helper developer to store block scope state #307 - [Fixed]
RenderErrorshould beSendandSync#304
- [Changed] Added lifetime specifier to
-
3.0.0-beta.618 Jan 2020 pre-releaseNothing published for this version