Re:I love building a startup in Rust. I wouldn't pick it again
by strokirk on Friday February 17, 2023 @03:17PM
(#34839941)
Is there any statically typed HTML templating language, for non-node languages? Genuine question.
[ Parent
| on HN ]
Re:I love building a startup in Rust. I wouldn't pick it again
by steveklabnik on Friday February 17, 2023 @03:31PM
(#34840134)
crates.io for Rust has 213 crates tagged "template-engine" https://crates.io/categories/template-engine
handlebars, terra, askama, and maud are examples I recognize from high up on that list.
Maud example: (chosen because it's the most "native Rust" in a sense and is designed for HTML specifically so I believe it's the closest to what you're asking for)
html! {
h1 { "Hello, world!" }
p.intro {
"This is an example of the "
a href="https://github.com/lambda-fairy/maud" { "Maud" }
" template language."
}
}
https://maud.lambda.xyz/