~/
rust-munich
·
crux + gpui
# What is crux? **crux** is a small Rust framework from **Red Badger**. It enforces one rule: > Your business logic is **pure**. > All I/O — HTTP, files, timers, the screen — lives in a separate **shell**. --- ## The shape ``` ┌──────────┐ Event ┌──────────┐ │ │ ─────────▶ │ │ │ shell │ │ core │ │ (UI, │ ◀───────── │ (logic, │ │ HTTP) │ Effect │ pure) │ └──────────┘ └──────────┘ ``` - The **core** is a plain Rust library. No `gpui`, no `reqwest`. - The **shell** wraps the core, listens for `Effect`s ("please fetch this URL"), and feeds the result back as a new `Event`. --- ## What you write Three things, all data: - `Event` — "something happened" (button clicked, weather arrived). - `Model` — your state. - `ViewModel` — what the UI gets to see (often a slimmer copy of the model). Plus one function: `update(event, &mut model) -> Command`. That's it. --- ## Why bother - The core is **trivially testable** — no mocks, no async runtime. - The same core can drive **different shells** — desktop, web, mobile, CLI. - It feels like **Elm** or **The Elm Architecture (TEA)**, in Rust. --- ## Where to find it - Repo:
- Docs: