✨ Dioxus 0.7 is in alpha - test it out! ✨
Build for web, desktop, and mobile, and more with a single codebase. Zero-config setup, integrated hot-reloading, and signals-based state management. Add backend functionality with Server Functions and bundle with our CLI.
fn app() -> Element {
let mut count = use_signal(|| 0);
rsx! {
h1 { "High-Five counter: {count}" }
button { onclick: move |_| count += 1, "Up high!" }
button { onclick: move |_| count -= 1, "Down low!" }
}
}
- Cross-platform apps in three lines of code (web, desktop, mobile, server, and more)
- Ergonomic state management combines the best of React, Solid, and Svelte
- Built-in featureful, type-safe, fullstack web framework
- Integrated bundler for deploying to the web, macOS, Linux, and Windows
- Subsecond Rust hot-patching and asset hot-reloading
- And more! Take a tour of Dioxus.
With one command, dx serve
and your app is running. Edit your markup, styles, and see changes in milliseconds. Use our experimental dx serve --hotpatch
to update Rust code in real time.
Dioxus apps are styled with HTML and CSS. Use the built-in TailwindCSS support or load your favorite CSS library. Easily call into native code (objective-c, JNI, Web-Sys) for a perfect native touch.
Render using web-sys, webview, server-side-rendering, liveview, or even with our experimental WGPU-based renderer. Embed Dioxus in Bevy, WGPU, or even run on embedded Linux!
Get started quickly with a complete set of primitives modeled after shadcn/ui and Radix-Primitives.
Dioxus is the fastest way to build native mobile apps with Rust. Simply run dx serve --platform android
and your app is running in an emulator or on device in seconds. Call directly into JNI and Native APIs.
Directly call your backend from your frontend with our built-in type-safe RPC using server_fn
. Supports streaming, suspense, bundle splitting, websockets, and more.
fn app() -> Element {
let mut fortune = use_signal(|| "Fetch a fortune!");
rsx! {
h1 { "{fortune}" }
button {
onclick: move |_| async move {
fortune.set(fetch_fortune().await.unwrap());
}
}
}
}
#[server]
async fn fetch_fortune() -> ServerFnResult<String> {
"Dioxus is super productive!".to_string()
}
Simply run dx bundle
and your app will be built and bundled with maximization optimizations. On the web, take advantage of .avif
generation, .wasm
compression, minification, and more. Build WebApps weighing less than 50kb and desktop/mobile apps less than 5mb.
We've put a ton of effort into building clean, readable, and comprehensive documentation. All html elements and listeners are documented with MDN docs, and our Docs runs continuous integration with Dioxus itself to ensure that the docs are always up to date. Check out the Dioxus website for guides, references, recipes, and more. Fun fact: we use the Dioxus website as a testbed for new Dioxus features - check it out!
Build your own renderer, or use a community renderer like Freya. Use our modular components like RSX, VirtualDom, Blitz, Taffy, and Subsecond.
Dioxus is a community-driven project, with a very active Discord and GitHub community. We're always looking for help, and we're happy to answer questions and help you get started. Our SDK is community-run and we even have a GitHub organization for the best Dioxus crates that receive free upgrades and support.
Dioxus has grown from a side project to a small team of fulltime engineers. Thanks to the generous support of FutureWei, Satellite.im, the GitHub Accelerator program, we're able to work on Dioxus full-time. Our long term goal is for Dioxus to become self-sustaining by providing paid high-quality enterprise tools. If your company is interested in adopting Dioxus and would like to work with us, please reach out!
Web |
|
Desktop |
|
Mobile |
|
Server-side Rendering |
|
The examples in the main branch of this repository target the git version of dioxus and the CLI. If you are looking for examples that work with the latest stable release of dioxus, check out the 0.6 branch.
The examples in the top level of this repository can be run with:
cargo run --example <example>
However, we encourage you to download the dioxus-cli to test out features like hot-reloading. To install the most recent binary CLI, you can use cargo binstall.
cargo binstall dioxus-cli@0.7.0-rc.0 --force
If this CLI is out-of-date, you can install it directly from git
cargo install --git https://github.com/DioxusLabs/dioxus dioxus-cli --locked
With the CLI, you can also run examples with the web platform. You will need to disable the default desktop feature and enable the web feature with this command:
dx serve --example <example> --platform web -- --no-default-features
- Check out the website section on contributing.
- Report issues on our issue tracker.
- Join the discord and ask questions!
This project is licensed under either the MIT license or the Apache-2 License.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Dioxus by you, shall be licensed as MIT or Apache-2, without any additional terms or conditions.