Ribboncurls is a Mustache template rendering engine written in Rust.
There is both a Rust Ribboncurls library and Ribboncurls CLI tool, depending on your needs. You can read more about those specific projects in their respective README.md files.
Note: Ribboncurls library public API is subject to change, so use with caution.
Ribboncurls supports all the required Mustache features as per Mustache spec and runs against the Mustache v1.4.2 spec tests.
- Comments:
12345{{! Comment Block! }}67890
- Delimiters: Change delimiters from
{{ }}
to your own custom delimiters{{=<% %>=}}(<%text%>)
- Interpolation
{{text}}
- Renders escaped variabletext
{{&text}}
,{{{text}}}
- Renders variabletext
without escaping{{a.b.c.d}}
- Renders HashMap properties- and more
- Sections
{{#text}}Renders when text exists{{/text}}
- Renders section whentext
is truthy{{#animals_array}}({{.}}){{/list}}
- Implicit iterator
- Inverted: Functionally serves as inverted sections
{{^text}}Renders when text does not exist{{/text}}
- Partials: Used to expand an external template into the current
template
{{>partial_property}}
This project and everyone participating in it is governed by the Tinted Theming Code of Conduct.
Ribboncurls is licensed under the MPL-2.0 license.
This project includes third-party code licensed under the MPL-2.0 license. See the THIRD_PARTY_LICENSES file for details.