webbing 0.1.0

APIs for the web platform for cross-compiled Rust to JS.
Documentation
  • Coverage
  • 0%
    0 out of 52 items documented0 out of 43 items with examples
  • Size
  • Source code size: 2.68 MB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 3.68 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Homepage
  • lord/webbing
    3 1 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • lord

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 webbing;

fn main() {
    let document = webbing::init();
    let body = document.element_query("body").unwrap();
    body.html_set("<h1>HELLO FROM RUST</h1> <button>CLICK ME</button>");
    let button = document.element_query("button").unwrap();
    button.on("click", |_| webbing::alert("WITNESS ME"));
}

Used with cargo build --target=asmjs-unknown-emscripten.

License

MIT or Apache-2.0, at your option. A fork of the original rust-webplatform.