ScriptsApr 12, 2026·1 min read

Dioxus — Full-Stack App Framework for Web, Desktop, and Mobile

Dioxus is a full-stack app framework for Rust with a React-like API. Build web (WASM), desktop (native WebView), mobile (iOS/Android), TUI, and server-rendered apps from one codebase. Hooks, components, server functions, and hot reloading.

SC
Script Depot · Community
Quick Use

Use it first, then decide how deep to go

This block should tell both the user and the agent what to copy, install, and apply first.

cargo install dioxus-cli
dx new my_app
cd my_app
dx serve                                    # Web dev server
dx serve --platform desktop                 # Desktop
use dioxus::prelude::*;

fn main() {
    launch(App);
}

#[component]
fn App() -> Element {
    let mut count = use_signal(|| 0);

    rsx! {
        h1 { "Counter: {count}" }
        button { onclick: move |_| count += 1, "Increment" }
        button { onclick: move |_| count -= 1, "Decrement" }
    }
}
Intro

Dioxus is a full-stack app framework for Rust inspired by React. Write components with hooks and JSX-like syntax (rsx! macro), deploy to web (WASM), desktop (WebView), mobile (iOS/Android), TUI, and server. Created by Jonathan Kelley.

What Dioxus Does

  • React-like API — components, hooks, context, props
  • rsx! macro — JSX-like syntax in Rust
  • Multi-platform — web, desktop, mobile, TUI, server
  • Server functions — call server code from client (like Next.js server actions)
  • Signals — fine-grained reactivity
  • Hot reloading — rsx! changes reload instantly
  • Router — file-based or declarative routing
  • Fullstack — SSR, hydration, streaming

Comparison

Framework Language Platforms Reactivity
Dioxus Rust Web, Desktop, Mobile, TUI Signals
Leptos Rust Web (SSR + WASM) Signals
Yew Rust Web (WASM) VDOM
Tauri Rust + JS Desktop, Mobile Frontend FW
React JavaScript Web VDOM

常见问题 FAQ

Q: Dioxus vs Leptos? A: Dioxus 覆盖更多平台(desktop, mobile, TUI),API 更像 React;Leptos 专注 web,更像 SolidJS,SSR 更成熟。

Q: 生产就绪? A: v0.6+ 已经可以用于生产 web 项目。Desktop 和 Mobile 平台还在完善中。

来源与致谢 Sources

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets