Sin descripción

Emil Boman fb396b0448 Fix fullstack render server context (#2139) hace 1 año
.cargo b836851d02 Add openidconnect authentication demo (#1500) hace 1 año
.devcontainer d3cf9f728c WIP - remove comment in Dockerfile hace 2 años
.docker fc0a093466 try fix hace 3 años
.github 72940cc14f Remove NASM from CI hace 1 año
.vscode ad7a350d2e fix hotreloading issues in the CLI hace 1 año
examples 44e997f7df Fix eventhandler optional (#2119) hace 1 año
notes 5dd33c9dcd Remove outdated docs hace 1 año
packages fb396b0448 Fix fullstack render server context (#2139) hace 1 año
translations 29b9375fbd fix readme translation links hace 1 año
.gitignore b71f1438f3 update gitignore hace 1 año
.mailmap 40feb00f49 Add mailmap to unify name of Jonathan Kelley hace 2 años
Cargo.lock 2ac4bdb673 Switch to tracing for the cli (#2137) hace 1 año
Cargo.toml eb79e61642 Add a ton of comments to rsx/hotreload, add snapshot testing, refactor a bit to simplify the crate (#2130) hace 1 año
LICENSE-APACHE 6537ad37b8 Add actual copies of the relevant licenses hace 3 años
LICENSE-MIT 6537ad37b8 Add actual copies of the relevant licenses hace 3 años
Makefile.toml a8eaf3da72 Exclude mobile from ci hace 1 año
README.md 29b9375fbd fix readme translation links hace 1 año
codecov.yml e03f8ca90c ci: no more codecov failing hace 3 años
flake.lock 6dbedd4e39 nix: Update rust version (#2133) hace 1 año
flake.nix 6dbedd4e39 nix: Update rust version (#2133) hace 1 año

README.md


[!WARNING] Dioxus 0.5 (currently in master) contains massive breaking changes and is not compatible with Dioxus 0.4

Dioxus is a portable, performant, and ergonomic framework for building cross-platform user interfaces in Rust.

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!" }
    }
}

Dioxus can be used to deliver webapps, desktop apps, static sites, mobile apps, TUI apps, liveview apps, and more. Dioxus is entirely renderer agnostic and can be used as a platform for any renderer.

If you know React, then you already know Dioxus.

Unique features:

  • Desktop apps running natively (no Electron!) in less than 10 lines of code.
  • Incredibly ergonomic and powerful state management.
  • Comprehensive inline documentation - hover and guides for all HTML elements, listeners, and events.
  • Blazingly fast 🔥🔥 and extremely memory efficient
  • Integrated hot reloading for fast iteration
  • First-class async support with coroutines and suspense
  • And more! Read the full release post.

Supported Platforms

Web
  • Render directly to the DOM using WebAssembly
  • Pre-render with SSR and rehydrate on the client
  • Simple "hello world" at about 65kb, comparable to React
  • Built-in dev server and hot reloading for quick iteration
Desktop
  • Render using Webview or - experimentally - with WGPU or Skia
  • Zero-config setup. Simply cargo-run to build your app
  • Full support for native system access without electron-esque IPC
  • Supports macOS, Linux, and Windows. Portable <3mb binaries
Mobile
  • Render using Webview or - experimentally - with WGPU or Skia
  • Support for iOS and Android
  • Significantly more performant than React Native
Liveview
  • Render apps - or just a single component - entirely on the server
  • Integrations with popular Rust frameworks like Axum and Warp
  • Extremely low-latency and ability to support 10,000+ simultaneous apps
Terminal
  • Render apps directly into your terminal, similar to ink.js
  • Powered by the familiar flexbox and CSS model of the browser
  • Built-in widgets like text input, buttons, and focus system

Why Dioxus?

There's tons of options for building apps, so why would you choose Dioxus?

Well, first and foremost, Dioxus prioritizes developer experience. This is reflected in a variety of features unique to Dioxus:

  • Autoformatting of our meta language (RSX) and accompanying VSCode extension
  • Hotreloading using an interpreter of RSX for both desktop and web
  • Emphasis on good docs - our guide is complete and our HTML elements are documented
  • Significant research in simplifying

Dioxus is also a very extensible platform.

  • Easily build new renderers by implementing a very simple optimized stack-machine
  • Build and share components and even custom elements

So... Dioxus is great, but why won't it work for me?

  • It's not fully mature yet. APIs are still shifting, things might break (though we try to avoid it)
  • You need to run in a no-std environment.
  • You don't like the React-hooks model of building UIs

Contributing

License

This project is licensed under the MIT license.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Dioxus by you, shall be licensed as MIT, without any additional terms or conditions.