| Crates.io | lit-html-macro |
| lib.rs | lit-html-macro |
| version | 0.0.1 |
| created_at | 2020-11-07 06:51:50.54598+00 |
| updated_at | 2020-11-07 16:58:06.167759+00 |
| description | A macro for using lit-html |
| homepage | |
| repository | https://github.com/richardanaya/lit-html-rs |
| max_upload_size | |
| id | 309569 |
| size | 4,504 |
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);
}