Expand description
§Mogwai
Mogwai is library for multi-domain user interface development using sinks and streams.
Its goals are simple:
- provide a declarative approach to creating and managing interface nodes, without a bias towards a specific UI domain (ie web, games, desktop applications, mobile)
- encapsulate component state and compose components easily
- explicate mutations and updates
- feel snappy
§Javascript/Browser DOM
This library is specific to writing mogwai apps to run in the browser via WASM.
§Learn more
Please check out the introduction module.
§Acronyms
If you’re wondering what the acronym “mogwai” stands for, here is a table of options that work well, depending on the domain. It’s fun to mix and match.
M | O | G | W | A | I |
---|---|---|---|---|---|
minimal | obvious | graphical | web | application | interface |
modular | operable | graphable | widget | ||
mostly | gui | work |
§JavaScript interoperability
This library is a thin layer on top of the web-sys
crate which provides raw bindings to tons of browser web APIs.
Many of the DOM specific structs, enums and traits come from web-sys
.
It is important to understand the JsCast
trait for writing web apps in Rust. Specifically its dyn_into
and
dyn_ref
functions are the primary way to cast JavaScript values as
specific Javascript types.
Modules§
- an_
introduction - An introduction to writing browser interfaces with mogwai.
- core
- Re-export of the mogwai library.
- event
- View events as streams of values.
- prelude
- Re-exports for convenience.
- utils
- Helpers and utilities.
- view
- Wrapped views.