2 releases
0.0.1 | Nov 7, 2020 |
---|---|
0.0.0 | Nov 7, 2020 |
#827 in #template
5KB
92 lines
lit-html-rs
A Rust library for using the HTML template library lit-html.
use lit_html::*;
#[template("<div>Hello ${name}</div>")]
pub struct HelloWorldTemplate {
pub name: String,
}
#[no_mangle]
pub fn main() {
let template = HelloWorldTemplate {
name: "Richard".to_string(),
};
render(template.execute(), js::DOM_BODY);
}
Dependencies
~1.5MB
~37K SLoC