15 releases (4 breaking)

✓ Uses Rust 2018 edition

0.7.0 Feb 21, 2020
0.5.4 Feb 1, 2020
0.5.0 Dec 30, 2019
0.3.5 Oct 15, 2019
0.2.0 Mar 31, 2019

#18 in Template engine

Download history 118/week @ 2019-12-14 66/week @ 2019-12-21 165/week @ 2019-12-28 204/week @ 2020-01-04 631/week @ 2020-01-11 297/week @ 2020-01-18 248/week @ 2020-01-25 259/week @ 2020-02-01 243/week @ 2020-02-08 222/week @ 2020-02-15 484/week @ 2020-02-22 233/week @ 2020-02-29 233/week @ 2020-03-07 229/week @ 2020-03-14 403/week @ 2020-03-21 824/week @ 2020-03-28

1,108 downloads per month

MIT/Apache and LGPL-3.0-or-later

21KB
492 lines

Disclaimer

All struct and function in this crate -- crate those based on real crate -- 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 Financial Contributors on Open Collective

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 around template with Rust expressions, conditionals or loops
  • Recursion in partial at compile time
  • Html minifier
  • A fancy-text debug mode to visualize the code generated by Yarte
  • Emit snipped annotations of the template at error
  • Mode server for wasm app isomorphic server side
  • Incorporates feature with-actix-web, an implementation of actix-web's trait Responder

Is it really the fastest?

See it for yourself in the benchmarks!

Documentation

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

Roadmap

  • #37 Derive for compiled DOM, implement App trait
  • Minify Css
  • intellij plugin (help wanted)
  • yarte/html/css UI like sciter
  • ... you can open a issue!

We are not looking for anything other than render HTML and text as fast as possible

Acknowledgment

Yarte is based on all previous templates engines, syntax as well as its documentation is highly influenced by Handlebars. As many ideas as possible used in Yarte are from other repositories.

Comments in the code clarify which ideas are used, and from where.

Contributing

Please, contribute to Yarte! The more the better! Feel free to 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

Contributors

Code Contributors

This project exists thanks to all the people who contribute.

Financial Contributors

Become a financial contributor and help us sustain our community. [Contribute]

Individuals

Organizations

Support this project with your organization. Your logo will show up here with a link to your website. [Contribute]

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

~11–15MB
~279K SLoC