Build Status

Yew

Yew is a modern Rust framework inspired by Elm and ReactJS.

Cutting Edge technologies

Rust to WASM compilation

This framework is designed to be compiled into modern browsers' runtimes: wasm, asm.js, emscripten.

To prepare the developments environment use installation instruction here: wasm-and-rust

Clean MVC approach inspired by Elm and Redux

Yew implements strict application state management based on message passing and updates:

src/main.rs

```rust

[macro_use]

extern crate yew; use yew::prelude::*;

type Context = ();

struct Model { }

enum Msg { DoIt, }

impl Component for Model { // Some details omitted. Explore the examples to get more.

type Msg = Msg;
type Properties = ();

fn create(_: Self::Properties, _: &mut Env<Context, Self>) -> Self {
    Model { }
}

fn update(&mut self, msg: Self::Msg, _: &mut Env<Context, Self>) -> ShouldRender {
    match msg {
        Msg::DoIt => {
            // Update your model on events
            true
        }
    }
}

}

impl Renderable for Model { fn view(&self) -> Html { html! { // Render your model here