rust-webplatform

Rust library for Emscripten-compiled JS apps.

  • Owner: rust-webplatform/rust-webplatform
  • Platform:
  • License::
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

rust-webplatform

A Rust library for use with emscripten to access the DOM.

NOTE: This project is no longer actively developed. See stdweb for an actively-developed project for using Rust in asmjs / wasm.

Read the documentation, read brson's post on how
Rust works with emscripten
,
or see an example app with rust-todomvc.

extern crate webplatform;

fn main() {
    let document = webplatform::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",, _, webplatform::alert("WITNESS ME"));
}

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

License

MIT or Apache-2.0, at your option.

Main metrics

Overview
Name With Ownerrust-webplatform/rust-webplatform
Primary LanguageJavaScript
Program languageJavaScript (Language Count: 4)
Platform
License:
所有者活动
Created At2015-09-12 01:00:54
Pushed At2017-10-18 18:25:44
Last Commit At2017-10-18 19:25:43
Release Count0
用户参与
Stargazers Count331
Watchers Count18
Fork Count31
Commits Count49
Has Issues Enabled
Issues Count16
Issue Open Count11
Pull Requests Count6
Pull Requests Open Count2
Pull Requests Close Count3
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private