notes/architecture/00-OVERVIEW.md
This directory contains comprehensive architecture documentation for the Dioxus framework, designed to help future Claude agents (and human contributors) understand the codebase deeply.
| File | Description |
|---|---|
01-CORE.md | VirtualDOM, rendering pipeline, component system, diffing algorithm |
02-CLI.md | Build system, dev server, bundling, terminal UI, platform support |
03-RSX.md | RSX macro parsing, AST types, code generation, autofmt |
04-SIGNALS.md | Signals, generational-box, hooks, stores, state management |
05-FULLSTACK.md | Server functions, SSR, hydration, client-server communication |
06-RENDERERS.md | Web, desktop, native, liveview renderer implementations |
07-HOTRELOAD.md | Subsecond hot-patching, RSX hot-reload, devtools protocol |
08-ASSETS.md | Manganis asset system, const serialization, build-time processing |
09-ROUTER.md | Routing system, Routable trait, navigation, history |
10-WASM-SPLIT.md | WASM code splitting, lazy loading, chunk management |
dioxus (umbrella crate)
├── dioxus-core (VirtualDOM, runtime, scheduler)
│ └── generational-box (Copy semantics for references)
├── dioxus-rsx (macro parsing)
│ └── dioxus-autofmt (code formatting)
├── dioxus-signals (reactive state)
│ ├── generational-box
│ └── dioxus-stores (nested reactivity)
├── dioxus-hooks (use_signal, use_effect, etc.)
├── dioxus-html (HTML elements, events)
├── dioxus-router (client-side routing)
│
├── Renderers:
│ ├── dioxus-web (WASM/browser)
│ ├── dioxus-desktop (wry/tao webview)
│ ├── dioxus-native (blitz/vello GPU)
│ ├── dioxus-liveview (WebSocket streaming)
│ └── dioxus-ssr (server-side rendering)
│
├── Fullstack:
│ ├── dioxus-fullstack (client/server coordination)
│ ├── dioxus-fullstack-core (transport, types)
│ ├── dioxus-fullstack-macro (#[server] macro)
│ └── dioxus-server (Axum integration)
│
├── CLI (dx command):
│ ├── dioxus-cli (main binary)
│ ├── dioxus-cli-config (Dioxus.toml parsing)
│ └── dioxus-cli-opt (optimization passes)
│
├── Hot Reload:
│ ├── subsecond (hot-patching runtime)
│ ├── dioxus-rsx-hotreload (template diffing)
│ └── dioxus-devtools (WebSocket communication)
│
├── Assets:
│ ├── manganis (asset!() macro)
│ ├── manganis-core (asset types)
│ ├── manganis-macro (proc-macro)
│ └── const-serialize (compile-time CBOR)
│
└── Code Splitting:
├── wasm-splitter (CLI tool)
├── wasm-split-macro (#[wasm_split])
└── wasm-split-cli (binary processing)
Dioxus uses generational-box to provide Copy semantics for references. This enables signals and other reactive primitives to be freely passed around without explicit cloning.
All renderers implement WriteMutations which defines how VirtualDOM changes translate to real DOM operations. This abstraction enables the same component code to run on web, desktop, mobile, and server.
RSX macros generate static Template definitions at compile time. Only dynamic parts are diffed at runtime, making updates extremely efficient.
Two complementary systems:
The asset!() macro embeds asset metadata in binary link sections. The CLI extracts this at build time, processes assets, and patches the binary with final URLs.
The #[server] macro generates dual code paths - client serialization and server handler - enabling seamless RPC-style communication.
HtmlEventConverter trait for cross-platform supportThese docs are designed to help with planned features: