Crates.io | gen-html |
lib.rs | gen-html |
version | 0.3.0 |
created_at | 2024-11-02 23:24:28.292929+00 |
updated_at | 2025-06-30 11:43:10.426456+00 |
description | Generate HTML using Rust |
homepage | |
repository | https://github.com/din0x/gen-html |
max_upload_size | |
id | 1433256 |
size | 59,762 |
gen-html
gen-html
is a templating library for generating HTML from Rust.
html!
macro generates code that is as fast as writing to a string by hand.if
, for
and match
inside your templates.Raw<T>
.axum
, actix-web
).use gen_html::html;
let series = ["Breaking Bad", "Better Call Saul", "Dexter"];
let markup = html! {
ol {
for title in series {
li { (title) }
}
}
};
println!("{}", markup);
See CONTRIBUTING.md
This project is licensed under MIT license.