draco 0.1.2

Draco is a Rust library for building client side web applications with Web Assembly.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use wasm_bindgen::prelude::*;

struct HelloWorld;

impl draco::App for HelloWorld {
    type Message = ();

    fn render(&self) -> draco::Node<Self::Message> {
        draco::html::h1().push("Hello, world!").into()
    }
}

#[wasm_bindgen]
pub fn start() {
    draco::start(HelloWorld, draco::select("main").expect("main").into());
}

pub fn main() {}