[][src]Crate smithy

Smithy is a framework for writing WebAssembly applications entirely in Rust. Its goal is to allow you to do so using ergonomic, idiomatic Rust, without giving up any of the compiler’s safety guarantees.

Example

let app = smd!(<div>hello world</div>);
let el_opt = web_sys::window()
  .and_then(|w| w.document())
  .query_selector("#app");
if let Some(el) = el_opt {
  smithy::mount(app, el);
}

N.B. these docs omit smd! and smd_borrowed!, which are re-exported from the smd_macro crate.

Modules

types

A module that re-exports useful Smithy types, and some others.

Functions

mount

Mounts the smithy app at the specified element.

rerender

Forces the currently mounted smithy app to re-render.

unwrapped_promise_from_future

Converts a future into an UnwrappedPromise, which causes the app to re-render when the future succeeds or fails.