Expand description
§RsHtml: A Template Engine for Seamless HTML and Rust Integration.
RsHtml is a powerful template engine that transforms your HTML templates into highly efficient Rust code at compile time, allowing you to seamlessly use Rust logic and expressions together with HTML to harness the full power of Rust for dynamic content generation. It is designed to help you build flexible and maintainable web applications.

§Quick Start
1. Add to Cargo.toml:
[dependencies]
rshtml = "0.5.0" # Use the latest versionuse rshtml::{traits::View, v};
use std::fmt;
fn main() -> fmt::Result {
let template = "RsHtml";
let hello = v!(<p>Hello {template}</p>);
let mut out = String::with_capacity(hello.text_size());
hello.render(&mut out)?;
print!("{out}");
Ok(())
}Modules§
Macros§
Structs§
Functions§
Type Aliases§
Derive Macros§
- RsHtml
- The primary derive macro for enabling RsHtml templating on a struct.