markup.rs
A blazing fast, type-safe template engine for Rust.
markup.rs
is a template engine for Rust powered by procedural macros which
parses the template at compile time and generates optimal Rust code to render
the template at run time. The templates may embed Rust code which is type
checked by the Rust compiler enabling full type-safety.
Features
- Fully type-safe with inline highlighted errors when using editor extensions like rust-analyzer.
- Less error-prone and terse syntax inspired by Haml, Slim, and Pug.
- Zero unsafe code.
- Zero runtime dependencies.
- ⚡ Blazing fast. The fastest in this benchmark among the ones which do not use unsafe code, the second fastest overall.
Install
[]
= "0.13.1"
Example
!
define
Output
Example Domain Example Domain This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission. More information... (c) 2020
Output (manually prettified)
Example Domain
Example Domain
This domain is for use in illustrative examples in documents. You may
use this domain in literature without prior coordination or asking for
permission.
More information...
(c) 2020