A binary pattern match-based Mustache template engine for Erlang/OTP that avoids regular expressions.
bbmustache is a Mustache template engine for Erlang/OTP. It implements the Mustache templating language using binary pattern matching instead of regular expressions for parsing, aiming for performance and Erlang idiomaticity. It allows Erlang developers to generate text outputs like HTML, configuration files, or emails from templates with data from maps or associative arrays.
Erlang/OTP developers who need a fast, spec-compliant Mustache template engine integrated into their Erlang applications or who want to generate text content from templates in a logic-less way.
Developers choose bbmustache for its performance-oriented design using binary pattern matching, full support for the Mustache specification, and seamless integration with Erlang's data structures and tooling. It offers flexibility with customizable escaping, key types, and serialization.
Binary pattern match Based Mustache template engine for Erlang/OTP.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses Erlang's binary pattern matching instead of regex, which can lead to faster template processing, as highlighted in the README's emphasis on avoiding regular expressions.
Supports both maps and associative arrays (proplists), allowing seamless integration with various Erlang data structures, as shown in the usage examples.
Fully implements the Mustache templating language with support for tags, sections, and partials, ensuring compatibility with other Mustache tools.
Offers options like customizable escaping, key types (atoms, binaries), and value serialization, enabling tailored usage for different needs, as detailed in the FAQ and examples.
The README explicitly notes that lambda expressions involve wasted processing, as the library is optimized for parse_binary + compile, which can impact performance in lambda-heavy templates.
Only supports Erlang/OTP 24 and later, limiting adoption in projects stuck on older versions without a clear migration path mentioned.
As a Mustache engine, it lacks built-in support for complex logic, inheritance, or extensibility beyond the specification, which might require workarounds for sophisticated use cases.