THE GLORY GUIDE
Learn Glory from first principles.
Glory is a semantic UI framework built around handwritten Rust builders, owned fine-grained reactivity, and replaceable rendering hosts. This guide explains not just what to type, but how the pieces fit together.
Before you start
The guide assumes basic Rust knowledge. Glory's current semantic architecture is under active development, so follow the migrated examples and implementation ledger rather than retired HTML-era tutorials.
Choose your learning path
1. Understand the model
Learn why Glory uses a retained semantic tree, explicit reactive ownership, and typed updates instead of a virtual DOM.
Architecture & design →2. Build an interface
Use built-in elements, derive reactive values, and implement your own Widget trait in plain Rust.
Write a custom widget →3. Choose a host
Launch in a browser, generate SSR snapshots, or mount the same widget in a native Blitz window.
Explore platforms →Install the framework
Glory requires Rust 1.94 or newer. Add the facade and select only the hosts your application uses. The web feature includes HTML mapping; hydrate adds browser adoption support.
Cargo.toml
[dependencies]
glory = { version = "0.3.1", features = ["web"] }
# Add hosts only when your application needs them:
# features = ["web", "ssr", "hydrate"]Create your first widget
Widgets are ordinary Rust values. Builders describe semantic nodes, while mounting connects them to a host. There is no template language and no browser DOM in this shared function.
main.rs
use glory::prelude::*;
fn hello() -> impl Widget {
col().fill((
text()
.kind(TextKind::Heading(1))
.content("Hello, Glory"),
text().content("Semantic UI, handwritten in Rust."),
))
}
// In a wasm32 browser host:
let app = glory::web::launch(root, hello())?;
// Keep the returned WebApp alive.What happens next?
The browser host creates real DOM from the semantic tree. A Cage revision runs only affected derived computations and bindings, which emit typed field patches. SSR and native hosts consume the same semantic operations through different adapters.
Declare
Compose views, text, controls, and your own Widget values with handwritten builders.
React
Store mutable sources in Cage handles and derive tracked values with Bond computations.
Render
Let Web, SSR, or Blitz interpret the same semantic creation and patch operations.