# 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. ## Install Save as a script file and run: ## Quick Use ```bash cargo install dioxus-cli dx new my_app cd my_app dx serve # Web dev server dx serve --platform desktop # Desktop ``` ```rust 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. - **Repo**: https://github.com/DioxusLabs/dioxus - **Stars**: 35K+ - **Language**: Rust - **License**: Apache 2.0 + MIT ## 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 - Docs: https://dioxuslabs.com/learn - GitHub: https://github.com/DioxusLabs/dioxus - License: Apache 2.0 + MIT --- Source: https://tokrepo.com/en/workflows/ce6e125e-3651-11f1-9bc6-00163e2b0d79 Author: Script Depot