minimal, obvious, graphical widget application interface
mogwai is a Rust crate for building GUI applications, primarily in the
browser, with cross-platform capabilities.
Overview
mogwai simplifies web app development by addressing challenges with
web-sys, focusing on:
- Element creation and styling
- Event handling
- Server-side rendering and cross-platform support
It offers a minimalistic and transparent approach, allowing you to structure your app freely.
Key Concepts
- View Construction: Use the
rsx!macro for intuitive view building. - Event Handling: Events are futures, not callbacks.
- Cross-Platform: Traits ensure operations are cross-platform, with room for specialization.
- Idiomatic Rust: Widgets are Rust types
Example
Here's a button that counts clicks:
use *;
use *;
Getting Started
- Install the Rust toolchain from https://rustup.rs/.
- Install trunk.
- Use
cargo-generateto start a new project:
cargo install cargo-generate
cargo generate --git https://github.com/schell/mogwai-template.git
cd your_project_name
trunk serve --config Trunk.toml
Resources
Community
Join the conversation on Element or via Matrix.
Support
Consider sponsoring on GitHub to support development.