Build web, desktop, and mobile apps from a single Rust codebase
Write code once and deploy it to browsers, desktops, and mobile devices simultaneously. Dioxus is a Rust UI framework that combines the state management benefits of React, Solid, and Svelte with built-in backend capabilities. You can start a development server with the dx serve command and see code changes reflected on the screen immediately.
Targeting multiple platforms with a single codebase
Dioxus is designed to handle web, desktop, mobile, and server targets with a single codebase. On the web, it supports rendering via WebAssembly or server-side rendering (SSR), while desktop targets use Webview or the experimental WGPU renderer. Android and iOS are first-class supported platforms, allowing quick deployment to emulators or physical devices using the dx serve --platform android command. This cross-platform functionality is simple enough to configure with just three lines of code.
Signal-based state management and full-stack integration
State management operates on a signal basis, combining the intuitiveness of React with the efficiency of Solid and Svelte. Backend features are deeply integrated with axum, providing built-in support for WebSocket, SSE, streaming, file upload/download, server-side rendering, form handling, and middleware. You can integrate an existing axum backend directly or use Server Functions to easily handle communication between the client and server.
Fast hot reloading and bundling optimization
Using the experimental --hotpatch option allows Rust code to be updated in real time. For deployment, the dx bundle command optimizes and bundles apps for web, macOS, Linux, and Windows. Web apps can produce binaries under 50kb, while desktop and mobile apps can generate lightweight binaries under 5mb, with automatic optimizations such as .avif generation, .wasm compression, and minification.
Native access and rendering options
Dioxus apps are styled with HTML and CSS, supporting built-in TailwindCSS or other CSS libraries. You can call native code directly via Objective-C, JNI, and Web-Sys to utilize platform-specific features. Rendering methods can be selected from web-sys, webview, server-side rendering, liveview, or the experimental WGPU-based renderer. Dioxus can be embedded in Bevy or WGPU, or run on embedded Linux. First-class primitive components modeled after shadcn/ui and Radix-Primitives are also provided for a quick start.
Considerations before adoption
Dioxus is provided under the MIT or Apache-2 license and is led by a dedicated core team. However, some features are in an experimental stage. For example, the WGPU-based renderer and hot patching are experimental features and may not guarantee stability. Additionally, examples in the main branch target the git version of dioxus and the CLI, so you should refer to the examples in the 0.6 branch if you want to use the latest stable release. It is suitable for developers familiar with the Rust ecosystem who value native performance and small binary sizes in cross-platform development. It is recommended to verify the stability of experimental features and their alignment with project requirements before adoption.