9 releases

✓ Uses Rust 2018 edition

0.1.7 Jan 11, 2020
0.1.6 Jul 28, 2019
0.1.5 May 19, 2019
0.1.4 Mar 16, 2019
0.0.2 Jan 28, 2019

#248 in WebAssembly

Download history 8/week @ 2019-11-08 21/week @ 2019-11-15 22/week @ 2019-11-22 21/week @ 2019-11-29 43/week @ 2019-12-06 119/week @ 2019-12-13 5/week @ 2019-12-20 35/week @ 2019-12-27 3/week @ 2020-01-03 143/week @ 2020-01-10 50/week @ 2020-01-17 10/week @ 2020-01-24 6/week @ 2020-01-31 15/week @ 2020-02-07 10/week @ 2020-02-14

118 downloads per month
Used in 2 crates (via virtual-dom-rs)

MIT/Apache

44KB
762 lines

html-macro

use html_macro::*;

fn main () {
    let component = html! { <div id='component'>Some component</div> };

    let text_var = "You can interpolate text variables";

    let html = html! {
       <div onclick=|_ev: web_sys::MouseEvent| {}>
          You can type text right into the elements
          { component }
          { text_var }
       </div>
    };
    println!("{}", node);
}

Dependencies

~1MB
~28K SLoC