11 releases
Uses old Rust 2015
0.4.2 | Oct 15, 2016 |
---|---|
0.4.1 | Oct 13, 2016 |
0.3.0 | Sep 21, 2015 |
0.2.0 | Sep 20, 2015 |
0.0.1 | Sep 12, 2015 |
#1672 in Web programming
41 downloads per month
2.5MB
64K
SLoC
rust-webplatform
A Rust library for use with emscripten to access the DOM.
Read the documentation, read brson's post on how Rust works with emscripten, or see an example app with rust-todomvc.
extern crate webplatform;
use webplatform::HtmlNode;
let body = HtmlNode::query("body").unwrap();
body.html_set("<h1>HELLO FROM RUST</h1> <button>CLICK ME</button>");
let mut button = HtmlNode::query("button").unwrap();
button.on("click", || alert("WITNESS ME"));
Used with cargo build --target=asmjs-unknown-emscripten
.
License
MIT or Apache-2.0, at your option.