Skip to content
STACK IT FAST

Dioxus

Curated OSSClassicCross-Platform Rust App Framework6-20 people

Audited from github.com/DioxusLabs/dioxus

Dioxus is a Rust app framework for web, desktop and mobile from one codebase: React-like rsx! components with signals, a virtual DOM with several renderers, axum-based fullstack server functions and the dx CLI.

Language
Rust
License
Apache-2.0
Running for
5 years
Team
6-20 people

Why this architecture

Dioxus keeps one virtual DOM and component model and swaps renderers per platform (WebAssembly, WebView, SSR, LiveView, native), while its own dx CLI handles hot-patching, asset bundling and packaging for every target.

Tech stack by layer

8 technologies · audited Oct 2, 2026
Frontend & UI
  • DioxusReact-like component framework with rsx! markup and signals; workspace version 0.8 alpha on the audited main branch.
  • WebAssemblyWeb renderer targets the browser through wasm-bindgen, web-sys and js-sys; wasm-split supports code splitting.
  • wry / taoDesktop renderer: dioxus-desktop draws into the OS WebView via wry and manages windows with tao.
  • Native rendererExperimental packages/native and native-dom crates render without a WebView, described in the README as WGPU-based.
Backend & APIs
  • AxumFullstack server integration; the README says Dioxus integrates with axum for server functions, SSR, WebSockets and SSE.
  • TokioAsync runtime for the CLI dev server, desktop renderer and fullstack server.
Infrastructure & Deploy
  • dx CLIdioxus-cli builds, serves, hot-reloads, hot-patches and bundles apps for web, desktop and mobile.
  • GitHub Actionsmain.yml runs CI and publish.yml publishes releases.
  • PlaywrightEnd-to-end tests in packages/playwright-tests; the devcontainer preinstalls Playwright browsers.
  • Nixflake.nix and flake.lock provide a reproducible development environment.
Tooling, Testing & Ops
  • AGENTS.mdRoot-level instructions for coding agents working in the repository.

Key architectural decisions

5 decisions
  1. 01

    One component model, many renderers

    The workspace keeps the virtual DOM in packages/core and ships separate renderer crates: packages/web (WebAssembly), packages/desktop (wry WebView), packages/ssr, packages/liveview and the experimental packages/native and native-dom, so the same rsx! components target browser, desktop, mobile and server.

  2. 02

    The CLI is part of the framework, not an add-on

    packages/cli (dioxus-cli, the dx command) depends on the rsx parser, autoformatter, hot-reload and subsecond crates and runs its own Axum dev server with WebSockets and tower-http, so building, serving, hot-patching and bundling for every platform share one tool.

  3. 03

    Subsecond hot-patching of Rust code

    packages/subsecond is a workspace crate that packages/core and packages/cli both depend on. The README describes "subsecond Rust hot-patching" through dx serve --hotpatch, which updates running Rust code without a full rebuild, alongside rsx and asset hot-reloading from packages/rsx-hotreload.

  4. 04

    Fullstack split into core, macro and server crates

    packages/fullstack, fullstack-core, fullstack-macro and fullstack-server are separate members, and the README states that Dioxus integrates deeply with axum and offers WebSockets, SSE, streaming, file upload, SSR and forms, or lets an existing axum backend be plugged in.

  5. 05

    Assets resolved at compile time with manganis

    packages/manganis and packages/asset-resolver handle assets: the resolver has separate web (web-sys fetch) and native (file system, Android NDK) backends, and const-serialize lets asset metadata be computed in const contexts so the CLI can bundle and optimise assets.

How Dioxus is built

How Dioxus is structured

Dioxus is a large Cargo workspace under packages/. The root Cargo.toml lists the members and sets a shared version (0.8.0-alpha.1 on the audited main branch). The README and docs links refer to the released 0.7 line.

Area Crates in packages/
Core core (virtual DOM), core-macro, core-template, core-types, generational-box, signals, stores, hooks
Markup rsx, rsx-hotreload, rsx-rosetta (HTML to rsx), autofmt, html, document
Renderers web, desktop, ssr, liveview, native, native-dom, interpreter
Fullstack fullstack, fullstack-core, fullstack-macro, fullstack-server
App libraries router, router-macro, history, logger
Tooling cli (dx), cli-config, cli-telemetry, cli-harnesses/*, devtools, subsecond, wasm-split, manganis, asset-resolver
Testing playwright-tests, fuzz, oracle

examples/ is organised as a numbered curriculum: 01-app-demos, 02-building-ui, through 07-fullstack, 08-apis, 09-reference and 10-integrations. notes/ holds the architecture notes, FAQ, release process and README translations.

Frontend

Components are functions returning Element, written with the rsx! macro and state from use_signal. The README's counter shows the shape. packages/core diffs component output and emits mutations, and each renderer applies them in its own way:

  • Web: WebAssembly via wasm-bindgen, web-sys and js-sys. wasm-split supports splitting the bundle.
  • Desktop: dioxus-desktop renders into the OS WebView with wry and manages windows with tao. A binary protocol in dioxus-interpreter-js carries DOM edits.
  • Mobile: the README documents dx serve --platform android. asset-resolver pulls in jni and ndk crates on Android.
  • SSR and LiveView: packages/ssr renders HTML strings, and packages/liveview drives the DOM from the server.
  • Native (experimental): packages/native and native-dom render without a WebView. The README describes this as a WGPU-based renderer.

Backend & APIs

The fullstack crates provide server functions and server rendering on Axum. The README lists WebSockets, SSE, streaming, file upload and download, forms and middleware, and says an existing Axum backend can be plugged in instead. The dx CLI also runs an Axum server of its own during development (axum, axum-server, tower-http and tokio-tungstenite in packages/cli/Cargo.toml) to serve builds and push hot-reload updates.

Build, test & deploy

  • dx serve runs an app with rsx and asset hot-reloading. dx serve --hotpatch uses subsecond to patch running Rust code. dx bundle packages for web, macOS, Linux, Windows and mobile.
  • .github/workflows/main.yml runs CI and publish.yml publishes releases. codecov.yml configures coverage, _typos.toml spell-checks, and lychee.toml checks links.
  • .devcontainer/Dockerfile starts from a nightly Rust image and installs WebKitGTK, GTK and Playwright browsers for desktop and end-to-end tests. flake.nix offers a Nix shell.
  • packages/fuzz and packages/oracle add fuzzing and differential testing of the core.
  • Crates use Rust edition 2024. The CLI requires Rust 1.93 and core crates 1.85.

What to copy (and what not to)

Copy:

  • A renderer-agnostic core that emits mutations, with thin per-platform renderers. That is what makes one component tree run everywhere.
  • Ship the CLI with the framework. Hot reload, hot patching and bundling stay in step with the runtime.
  • A numbered examples curriculum (01- … 10-) that doubles as a learning path.
  • Fuzzing the core (packages/fuzz) when correctness of diffing matters.

Don't copy blindly:

  • Dozens of crates and several renderers are a large surface to keep compatible. A single-platform app should not split itself this finely.
  • main carries a 0.8 alpha. Applications should depend on released versions.

For web-only, SSR-first apps, compare with Leptos. For a desktop shell with a JavaScript UI and Rust commands, see the Tauri + React rules.

Sources & repo audit

Audited
Oct 2, 2026
Commit
b2ed8c3
License
Apache-2.0

Independent analysis of repository at github.com/DioxusLabs/dioxus. Spotted an inaccuracy? Use the claim form to request a correction.

Maintainer? Add the architecture badge to your README
architecture: stackitfast
[![Architecture on STACK IT FAST](https://stackitfast.com/badge/dioxus.svg)](https://stackitfast.com/project/dioxus)
Use this stack

Scaffold it with your agent

Paste this prompt into Claude Code, Cursor, Windsurf or AGY to start a project with Dioxus's architecture.

  1. 1Copy the promptThe full markdown spec, with every layer and decision.
  2. 2Open your AI toolClaude Code, Cursor, Windsurf or Copilot, in a new repo.
  3. 3Paste and scaffoldUse it as the first instruction; review before you ship.
use-this-stack.md · 59 lines · 6.9 KB
# MISSION: Scaffold "Dioxus" Production Architecture
You are an expert Senior Staff Software Architect and Full-Stack Engineer. Your mission is to scaffold and implement a production-grade, highly reliable, and modular codebase following the proven architecture of **Dioxus**.
---
## 1. PROJECT SPECIFICATIONS & BENCHMARK
- **Reference Architecture**: Dioxus
- **What It Does**: Dioxus is a Rust app framework for web, desktop and mobile from one codebase: React-like rsx! components with signals, a virtual DOM with several renderers, axum-based fullstack server functions and the dx CLI.
- **Domain & Category**: Cross-Platform Rust App Framework
- **Production Scale**: 6-20 people
- **Development Mode**: CLASSIC
- **Architectural Rationale**: Dioxus keeps one virtual DOM and component model and swaps renderers per platform (WebAssembly, WebView, SSR, LiveView, native), while its own dx CLI handles hot-patching, asset bundling and packaging for every target.
- **Live Website Reference**: https://dioxuslabs.com
- **Source Repository**: https://github.com/DioxusLabs/dioxus
---
## 2. PRODUCTION TECH STACK
- **Full Stack Array**: Rust, Dioxus, WebAssembly, Axum, Tokio, Playwright, Nix, GitHub Actions
- **Primary Language(s)**: Rust, HTML, JavaScript, TypeScript
- **License of the reference repo**: Apache-2.0
- **Frontend**: Dioxus — React-like component framework with rsx! markup and signals; workspace version 0.8 alpha on the audited main branch.; WebAssembly — Web renderer targets the browser through wasm-bindgen, web-sys and js-sys; wasm-split supports code splitting.; wry / tao — Desktop renderer: dioxus-desktop draws into the OS WebView via wry and manages windows with tao.; Native renderer — Experimental packages/native and native-dom crates render without a WebView, described in the README as WGPU-based.
- **Backend & APIs**: Axum — Fullstack server integration; the README says Dioxus integrates with axum for server functions, SSR, WebSockets and SSE.; Tokio — Async runtime for the CLI dev server, desktop renderer and fullstack server.
- **Infrastructure & deploy**: dx CLI — dioxus-cli builds, serves, hot-reloads, hot-patches and bundles apps for web, desktop and mobile.; GitHub Actions — main.yml runs CI and publish.yml publishes releases.; Playwright — End-to-end tests in packages/playwright-tests; the devcontainer preinstalls Playwright browsers.; Nix — flake.nix and flake.lock provide a reproducible development environment.
- **Tooling, testing & ops**: AGENTS.md — Root-level instructions for coding agents working in the repository.
---
## 3. KEY ARCHITECTURAL DECISIONS (audited from https://github.com/DioxusLabs/dioxus @ b2ed8c3)
1. **One component model, many renderers**: The workspace keeps the virtual DOM in packages/core and ships separate renderer crates: packages/web (WebAssembly), packages/desktop (wry WebView), packages/ssr, packages/liveview and the experimental packages/native and native-dom, so the same rsx! components target browser, desktop, mobile and server.
2. **The CLI is part of the framework, not an add-on**: packages/cli (dioxus-cli, the dx command) depends on the rsx parser, autoformatter, hot-reload and subsecond crates and runs its own Axum dev server with WebSockets and tower-http, so building, serving, hot-patching and bundling for every platform share one tool.
3. **Subsecond hot-patching of Rust code**: packages/subsecond is a workspace crate that packages/core and packages/cli both depend on. The README describes "subsecond Rust hot-patching" through dx serve --hotpatch, which updates running Rust code without a full rebuild, alongside rsx and asset hot-reloading from packages/rsx-hotreload.
4. **Fullstack split into core, macro and server crates**: packages/fullstack, fullstack-core, fullstack-macro and fullstack-server are separate members, and the README states that Dioxus integrates deeply with axum and offers WebSockets, SSE, streaming, file upload, SSR and forms, or lets an existing axum backend be plugged in.
5. **Assets resolved at compile time with manganis**: packages/manganis and packages/asset-resolver handle assets: the resolver has separate web (web-sys fetch) and native (file system, Android NDK) backends, and const-serialize lets asset metadata be computed in const contexts so the CLI can bundle and optimise assets.
---
## 4. NON-NEGOTIABLE ARCHITECTURAL GUARDRAILS
1. **Monorepo & Modular Separation**:
   - Structure as a Turborepo monorepo with strict package boundaries:
     - `apps/web`: Application UI, routing, layouts, and server endpoints.
     - `packages/ui`: Shared design tokens, CSS variables, and Radix UI primitive components.
     - `packages/db`: Database schemas, client singleton, declarative migrations, and seed scripts.
     - `packages/config`: Shared TypeScript, ESLint, and build configurations.
2. **Strict Type Safety & Zero `any` Policy**:
   - Enable `strict: true`, `noImplicitAny: true`, and `strictNullChecks: true`.
   - Validate ALL external inputs, API request bodies, and query parameters with **Zod** schemas before execution.
3. **Frontend & Rendering Guidelines**:
   - Isolate interactive UI state to leaf components. Keep core pages lightweight and performant.
4. **Design System & Aesthetics**:
   - Keep every color, radius, shadow and font in a single token file (CSS variables) and consume tokens everywhere; never hardcode hex values in components.
   - Prefer crisp 1px borders and one subtle shadow scale over blurry default shadows. Pair one sans-serif for body/headings with one monospace for tags, badges, metrics, and code.
5. **Data Layer & Reliability**:
   - Write declarative schema definitions with foreign keys, composite indexes on queried filters, and automated timestamp triggers.
   - Use connection pooling and prepared statements for serverless database execution.
---
## 5. STEP-BY-STEP SCAFFOLDING ROADMAP
- **Phase 1: Workspace & Root Config**: Initialize package manager, monorepo configuration (`turbo.json`, `tsconfig.base.json`, `package.json`).
- **Phase 2: Database Schema & Client**: Set up the data layer: client, connection pool, models, and migration scripts.
- **Phase 3: Design Tokens & UI Primitives**: Build accessible `Button`, `Input`, `Card`, `Badge`, and layout wrappers inside `packages/ui`.
- **Phase 4: Core Application Routes & Handlers**: Implement primary authentication, user session handling, and application routes.
- **Phase 5: Quality Assurance & Build Verification**: Run `tsc --noEmit`, ESLint, Prettier, and smoke test suites to ensure zero compilation or runtime errors.
---
## 6. EXECUTION INSTRUCTIONS
1. Review all specifications, architectural guardrails, and stack choices above.
2. Present the full monorepo directory tree structure.
3. Systematically generate the complete, production-ready codebase according to the 5-phase roadmap above — starting with the root workspace setup, followed by the database schema, UI design system package, and full-stack application routes until the repository is fully scaffolded and ready to run.
Scaffolded something with this prompt?
Would you pick this stack for a cross-platform rust app framework project?

Frequently asked about Dioxus

What is Dioxus?

Dioxus is a Rust framework for building web, desktop and mobile apps from one codebase. Components are written with the rsx! macro and signals, rendered by a virtual DOM in packages/core, and shipped with the dx CLI.

Does Dioxus use a virtual DOM?

Yes. packages/core implements a virtual DOM that diffs component output and hands mutations to a renderer: WebAssembly in the browser, a WebView on desktop, HTML for SSR, LiveView over a socket, or an experimental native renderer.

Dioxus or Leptos?

Dioxus targets web, desktop and mobile from one component model and ships its own CLI and bundler. Leptos focuses on web apps with fine-grained reactivity and SSR with hydration. Pick Dioxus for cross-platform apps and Leptos for web-only, SSR-first apps.

Does Dioxus have a backend?

Yes. The fullstack crates add server functions and server-side rendering on top of axum, with WebSockets, SSE, streaming and file uploads, and an existing axum backend can be integrated instead.

How does Dioxus render on desktop?

dioxus-desktop renders into the operating system WebView through the wry crate and manages windows with tao, the same libraries Tauri uses. An experimental native renderer in packages/native draws without a WebView.

One email a month: new deep dives and stack trends

New source-audited architectures, head-to-head comparisons and the monthly stack report. No spam, unsubscribe anytime.

use-this-stack.md