Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zzau13/yarte
Yarte stands for Yet Another Rusty Template Engine
https://github.com/zzau13/yarte
handlebars rust template-engine
Last synced: 4 days ago
JSON representation
Yarte stands for Yet Another Rusty Template Engine
- Host: GitHub
- URL: https://github.com/zzau13/yarte
- Owner: zzau13
- License: apache-2.0
- Created: 2019-07-06T21:29:46.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-08-07T20:23:26.000Z (4 months ago)
- Last Synced: 2024-11-27T22:16:01.131Z (15 days ago)
- Topics: handlebars, rust, template-engine
- Language: Rust
- Homepage: https://yarte.netlify.com
- Size: 3.44 MB
- Stars: 280
- Watchers: 10
- Forks: 15
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE-APACHE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-rust - zzau13/yarte
README
# Yarte [![Latest version](https://img.shields.io/crates/v/yarte.svg)](https://crates.io/crates/yarte) [![Netlify Status](https://api.netlify.com/api/v1/badges/1ccce8b0-cb08-41b1-a781-f883a6cc7767/deploy-status)](https://app.netlify.com/sites/yarte/deploys)
Yarte stands for **Y**et **A**nother **R**usty **T**emplate **E**ngine. 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.
## Documentation
In order to fully understand Yarte's capabilities take a look at the following documentation:
- [Tests](./yarte/tests)
- [Our book](https://yarte.netlify.com/)
- [Crate documentation](https://docs.rs/yarte/)Or, in nightly, just:
```rust
#[yarte] "{{> my_template }}"
```
`bytes-buf` feature can produce **SIGILL**.
More details in https://github.com/botika/v_escape/issues/54.Yarte is under development.
### Is it really fast?
Run `cargo bench` with rust nightly.Results in my `AMD Ryzen 9 5900HX`
```
Teams time: [62.335 ns 62.704 ns 63.138 ns]
Big table time: [28.546 µs 28.690 µs 28.873 µs]
```See it for yourself in the [TechEmpower benchmarks][bench] with [`actix`][actix] and [`ntex`][ntex]
## Acknowledgment
Yarte is based on all previous templates engines, syntax as well as its documentation
is highly influenced by [Handlebars][handlebars].
Logo adapted from [Creative Commons][commons] images[bench]: https://tfb-status.techempower.com/
[handlebars]: https://handlebarsjs.com/
[ntex]: https://github.com/ntex-rs/ntex
[actix]: https://github.com/actix/actix-web
[commons]: https://commons.wikimedia.org### Code of conduct
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version][homepage]: http://contributor-covenant.org
[version]: 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](LICENSE-APACHE) and [LICENSE-MIT](LICENSE-MIT) respectively.