37 releases (9 breaking)

✓ Uses Rust 2018 edition

new 0.12.0 Jul 5, 2020
0.10.1 Jun 21, 2020
0.7.0 Feb 21, 2020
0.5.0 Dec 30, 2019
0.2.0 Mar 31, 2019

#5 in #handlebars

Download history 285/week @ 2020-03-16 773/week @ 2020-03-23 574/week @ 2020-03-30 877/week @ 2020-04-06 478/week @ 2020-04-13 281/week @ 2020-04-20 371/week @ 2020-04-27 191/week @ 2020-05-04 491/week @ 2020-05-11 676/week @ 2020-05-18 433/week @ 2020-05-25 520/week @ 2020-06-01 422/week @ 2020-06-08 364/week @ 2020-06-15 341/week @ 2020-06-22 458/week @ 2020-06-29

1,919 downloads per month

MIT/Apache and LGPL-3.0-or-later

89KB
2.5K SLoC

Disclaimer

All struct and function in this crate -- crate those based on the real crates -- are entirely fictional. All celebrity code are impersonated. The following program contains coarse language and due to its content it should not be used by anyone.

Yarte Latest version Build Status

Yarte stands for Yet Another Rust Template Engine, is the fastest template engine. Uses a Handlebars-like syntax, well-known and intuitive for most developers. Yarte is an optimized, and easy-to-use rust crate, with which developers can create logic around their HTML templates using conditionals, loops, rust code and template composition.

Features

  • Meta programming system with all Rust expressions, conditionals, loops or modules
  • Recursion in partial at compile time
  • Zero copy helpers
  • fmt::Display and optimized memcopy implementation for render to bytes
  • Render numbers with Itoa, Dtoa, Ryu and itoa simd
  • A fancy-text debug mode to visualize the code generated by Yarte
  • Emit snipped annotations at error
  • Integrated, zero copy and infallible, simd json serializer to Bytes
  • Infallible render to Bytes

Is it really the fastest?

See it for yourself in the TechEmpower benchmarks with ntex!

Documentation

In order to fully understand Yarte's capabilities take a look at the following documentation:

Acknowledgment

Yarte is based on all previous templates engines, syntax as well as its documentation is highly influenced by Handlebars.

Contributing

Please, contribute to Yarte! The more the better! Feel free to open an issue and/or contacting directly with the owner for any request or suggestion.

Code of conduct

This Code of Conduct is adapted from the Contributor Covenant, version 1.4, available at http://contributor-covenant.org/version/1/4

License

This project is distributed under the terms of both the Apache License (Version 2.0) and the MIT license, specified in LICENSE-APACHE and LICENSE-MIT respectively.

Dependencies

~13MB
~232K SLoC