Kogia-sima / Sailfish
Licence: mit
Simple, small, and extremely fast template engine for Rust
Stars: ✭ 242
Programming Languages
rust
11053 projects
Labels
Projects that are alternatives of or similar to Sailfish
Elefant
Elefant, the refreshingly simple PHP CMS and web framework.
Stars: ✭ 188 (-22.31%)
Mutual labels: template-engine
Jte
jte is a secure and lightweight template engine for Java.
Stars: ✭ 228 (-5.79%)
Mutual labels: template-engine
Diamond
Diamond is a full-stack web-framework written in The D Programming Language using vibe.d
Stars: ✭ 173 (-28.51%)
Mutual labels: template-engine
Gotemplatebenchmark
comparing the performance of different template engines
Stars: ✭ 180 (-25.62%)
Mutual labels: template-engine
Windowstemplatestudio
Windows Template Studio quickly builds a UWP app, using a wizard-based UI to turn your needs into a foundation of Windows 10 patterns and best practices.
Stars: ✭ 2,089 (+763.22%)
Mutual labels: template-engine
Eta
Embedded JS template engine for Node, Deno, and the browser. Lighweight, fast, and pluggable. Written in TypeScript
Stars: ✭ 233 (-3.72%)
Mutual labels: template-engine
Thymeleaf
Thymeleaf is a modern server-side Java template engine for both web and standalone environments.
Stars: ✭ 2,251 (+830.17%)
Mutual labels: template-engine
Quicktemplate
Fast, powerful, yet easy to use template engine for Go. Optimized for speed, zero memory allocations in hot paths. Up to 20x faster than html/template
Stars: ✭ 2,287 (+845.04%)
Mutual labels: template-engine
Microconfig
Modern tool for microservice configuration management
Stars: ✭ 180 (-25.62%)
Mutual labels: template-engine
Ructe
Rust Compiled Templates with static-file handling
Stars: ✭ 206 (-14.88%)
Mutual labels: template-engine
Craftsman
Craftsman is the workhorse behind the Wrapt framework and provides a suite of CLI commands for quickly scaffolding out new files and projects for your .NET Web APIs with simple CLI commands and configuration files.
Stars: ✭ 165 (-31.82%)
Mutual labels: template-engine
Spring Boot Email Tools
A set of services and tools for sending emails in a Spring Boot 1.5.x application using a Template Engine
Stars: ✭ 164 (-32.23%)
Mutual labels: template-engine
Yarte
Yarte stands for Yet Another Rust Template Engine
Stars: ✭ 189 (-21.9%)
Mutual labels: template-engine
Sodajs
Light weight but powerful template engine for JavaScript
Stars: ✭ 240 (-0.83%)
Mutual labels: template-engine
Himl
HTML-based Indented Markup Language for Ruby
Stars: ✭ 236 (-2.48%)
Mutual labels: template-engine
Fatfree
A powerful yet easy-to-use PHP micro-framework designed to help you build dynamic and robust Web applications - fast!
Stars: ✭ 2,504 (+934.71%)
Mutual labels: template-engine
✨ Features
- Simple and intuitive syntax inspired by EJS
- Include another template file inside template
- Built-in filters
- Minimal dependencies (<15 crates in total)
- Extremely fast (See benchmarks)
- Better error message
- Syntax highlighting support (vscode, vim)
- Works on Rust 1.42 or later
🐟 Example
Dependencies:
[dependencies]
sailfish = "0.3.1"
Template file (templates/hello.stpl):
<html>
<body>
<% for msg in &messages { %>
<div><%= msg %></div>
<% } %>
</body>
</html>
Code:
use sailfish::TemplateOnce;
#[derive(TemplateOnce)]
#[template(path = "hello.stpl")]
struct HelloTemplate {
messages: Vec<String>
}
fn main() {
let ctx = HelloTemplate {
messages: vec![String::from("foo"), String::from("bar")],
};
println!("{}", ctx.render_once().unwrap());
}
You can find more examples in examples directory.
🐾 Roadmap
-
Template
trait (RFC) - Template inheritance (block, partials, etc.)
👤 Author
🇯🇵 Ryohei Machida
- GitHub: @Kogia-sima
🤝 Contributing
Contributions, issues and feature requests are welcome!
Since sailfish is an immature library, there are many planned features that is on a stage of RFC. Please leave a comment if you have an idea about its design!
Also I welcome any pull requests to improve sailfish! Find issue with Status: PR Welcome label, and let's create a new pull request!
Show your support
Give a ⭐️ if this project helped you!
📝 License
Copyright © 2020 Ryohei Machida.
This project is MIT licensed.
This README was generated with ❤️ by readme-md-generator
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].