AGENTS.md
AGENTS.mdAGENTS.mdroot
Quality
70/100
Scores the file, not the repository.Length
487 words
7 headings · 2 code blocksRepository
38k
— · pushed 0 days agoLast changed
2 days ago
First indexed 2 days ago.1# Dioxus Agent Guide23Dioxus is a cross-platform UI framework for Rust, similar to React. It compiles to web (WASM), desktop (webview), mobile (iOS/Android), and native (GPU-rendered).45## Quick Overview67- **Language**: Rust (stable toolchain)8- **UI Model**: React-like with VirtualDOM, components, hooks, signals9- **Syntax**: JSX-like `rsx!` macro for declaring UI10- **Platforms**: Web, Desktop (Windows/macOS/Linux), Mobile, Native, LiveView (server-rendered)1112## Workspace Structure1314```15packages/16├── dioxus/ # Main re-export crate users depend on17├── core/ # VirtualDOM, components, diffing, scheduling18├── rsx/ # RSX macro parsing and code generation19├── rsx-hotreload/ # Template diffing for hot-reload20├── signals/ # Reactive state (Signal, Memo, Store)21├── hooks/ # Built-in hooks (use_signal, use_effect, etc.)22├── router/ # Type-safe routing with #[derive(Routable)]23├── fullstack/ # SSR, hydration, #[server] functions24├── cli/ # `dx` build tool, dev server, bundling25├── web/ # WASM renderer26├── desktop/ # Wry/Tao webview renderer27├── native/ # Blitz/Vello GPU renderer28├── liveview/ # WebSocket streaming renderer29├── manganis/ # asset!() macro for compile-time assets30├── subsecond/ # Hot-patching system (jump table indirection)31├── devtools/ # Dev server communication protocol32├── interpreter/ # Sledgehammer JS for DOM mutations33└── wasm-split/ # WASM code splitting34```3536## Architecture Documentation3738For deeper understanding, see `notes/architecture/`:3940| When working on... | Read... |41| ------------------------------------------ | ------------------ |42| VirtualDOM, components, diffing, events | `01-CORE.md` |43| CLI, build system, bundling, dev server | `02-CLI.md` |44| RSX macro, parsing, formatting | `03-RSX.md` |45| Signals, state management, reactivity | `04-SIGNALS.md` |46| Server functions, SSR, hydration | `05-FULLSTACK.md` |47| Web/desktop/native/liveview renderers | `06-RENDERERS.md` |48| Hot-reload, hot-patching, devtools | `07-HOTRELOAD.md` |49| Asset macro, manganis, const serialization | `08-ASSETS.md` |50| Router, navigation, nested routes | `09-ROUTER.md` |51| WASM code splitting | `10-WASM-SPLIT.md` |5253## Key Concepts5455- **VirtualDOM**: Tree of `VNode` with templates, dynamic nodes, and attributes56- **Signals**: Copy-able reactive primitives via generational-box (generation-based validity)57- **WriteMutations**: Trait that renderers implement to apply DOM changes58- **RSX**: Proc macro that compiles JSX-like syntax to `VNode` construction59- **Server Functions**: `#[server]` macro generates client RPC stubs and server handlers60- **Subsecond**: Hot-patches Rust code via jump table indirection (no memory modification)61- **Manganis**: `asset!("/main.css")` macro for including assets by embedding data via linker symbols6263## Common Patterns6465**Component definition**:66```rust67#[component]68fn MyComponent(name: String) -> Element {69 let mut count = use_signal(|| 0);70 rsx! {71 button { onclick: move |_| count += 1, "{name}: {count}" }72 }73}74```7576## Notes for Agents77781. The `dioxus` crate re-exports from other crates - most implementation is in `packages/core`, `packages/signals`, etc.792. RSX macro expansion happens in `packages/rsx` - look there for syntax questions803. Each renderer implements `WriteMutations` differently - see `06-RENDERERS.md`814. Hot-reload has two systems: RSX template diffing (fast) and Subsecond code patching (full Rust)825. Assets use link sections and binary patching - the `asset!()` macro creates symbols the CLI processes83
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| OnlyTerp/prompt-cache-skillsAGENTS.md · 112 | AGENTS.md | setupbuildtestlint-format+5 | 100/100 | 3 days ago | |
| n8n-io/n8npackages/@n8n/agents/AGENTS.md · 199k | AGENTS.md | buildteststylearch+3 | 100/100 | 3 days ago | |
| duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70 | AGENTS.md | buildteststylearch+3 | 100/100 | 3 days ago | |
| wpscanteam/wpscanAGENTS.md · 9.7k | AGENTS.md | setupbuildteststyle+6 | 100/100 | 2 days ago | |
| SkeneTechnologies/skene-cookbookAGENTS.md · 51 | AGENTS.md | setupbuildtestlint-format+7 | 100/100 | 2 days ago | |
| mui/material-uiAGENTS.md · 99k | AGENTS.md | setupbuildtestlint-format+9 | 100/100 | 3 days ago | |
| trick77/agents-md-syncAGENTS.md · 2 | AGENTS.md | setupbuildteststyle+5 | 100/100 | 3 days ago | |
| aaif-goose/gooseAGENTS.md · 52k | AGENTS.md | setupbuildtestlint-format+6 | 100/100 | 3 days ago |
