Update Rust crate dioxus to 0.7.0 #180
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.3.2→0.7.0Release Notes
DioxusLabs/dioxus (dioxus)
v0.7.2Compare Source
This release fixes a number of issues since the 0.7.1 release.
reference to null or undefined symbolstripsettingWhat's Changed
use_dropto prelude by @barafael in #4939SyncStoretype alias anduse_store_synchook todioxus-storesby @nicoburns in #5014New Contributors
Full Changelog: DioxusLabs/dioxus@v0.7.1...v0.7.2
v0.7.1Compare Source
Post-Release Bug Fixes
This release fixes a number of critical bugs that slipped through v0.7.0 testing.
Namely:
unwrap()calls that were supposed to be errorsextract()use a blank GET request when called outside the runtime--platformflag was accidentally removed completely, it is now backWe recommend updating with
cargo binstall [email protected] --forceordx self-updateWhat's Changed
with_on_window_readyto allow modifying window before webview by @jkelleyrtp in #4919New Contributors
Full Changelog: DioxusLabs/dioxus@v0.7.0...v0.7.1
v0.7.0: Dioxus v0.7.0Compare Source
Hot-Patching, Native Renderer, Axum Integration, Bundle Splitting, Radix-UI, more!
Welcome back to another Dioxus release! Dioxus (dye • ox • us) is a framework for building cross-platform apps in Rust. We make it easy to ship full-stack web, desktop, and mobile apps with a single codebase.
Dioxus 0.7 delivers on a number of promises we made to improve Rust GUI, and more broadly, what we call “high level Rust.” Rust has excelled as a tool for building foundational software, but we hope with Dioxus 0.7, it’s one step closer to being suitable for rapid, high-level development.
In this release, we’re shipping some incredible features. The highlights of this release include:
Dioxus 0.7 also brings a number of other exciting new features:
Plus, a number of quality-of-life upgrades:
curl https://dioxus.dev/install.sh | sh)dx self-updateand update notificationsdx serve @​client --package xyz @​server --package xyzRust Hot-patching with Subsecond
The biggest feature of this release: Dioxus now supports hot-patching of Rust code at runtime! You can now edit your Rust code and see changes without losing your app’s state.
We’ve been working on this feature for almost an entire year, so this is a very special release for us. The tool powering this hot-patching is called Subsecond and works across all major platforms: Web (WASM), Desktop (macOS, Linux, Windows), and even mobile (iOS, Android):
hotpatch-android.mp4
ios-binarypatch.mp4
You can now iterate on your app’s frontend and backend simultaneously without skipping a beat.
hotpatch-wasm-complete.mp4
Subsecond works in tandem with the Dioxus CLI to enable hot-patching for any Rust project. Simply run
dx serveon your project and allsubsecond::callsites will be hot-patched. For example, here’s Subsecond working with a Ratatui app:subsecond-tui.mp4
The infrastructure to support Subsecond is quite complex. Currently, we plan to only ship the Subsecond engine within the Dioxus CLI itself with a long-term plan to spin the engine out into its own crate. For now, we still want the ecosystem to experience the magic of Subsecond, so we’ve made the CLI compatible with non-dioxus projects and removed “dioxus” branding when not serving a dioxus project.
Hot-patching Rust code is no simple feat. To achieve a segfault-free experience, we recommend framework authors to tie into Subsecond’s minimal runtime. For application developers, you can simply use
subsecond::call(some_fn)at clean integration points to take advantage of hot-patching. If you use Dioxus, hot-patching comes directly integrated with components and server functions.While in theory we could implicitly override calls to
tickwith function detouring, we instead chose explicit integration points. The first version of subsecond modified process memory externally, but we struggled with issues where the program would be stuck in a task with no way to “resurface”. For this example, the program would always be waiting for IO, making our edits not take effect:Instead, the explicit runtime integration provides a simple “synchronization point” where the framework can handle things like closing TCP connections, re-instancing state, dropping event listeners, etc. If you add or remove a field of a struct between hot-patches, Subsecond does not automatically migrate your state for you. Libraries like
bevy-reflectmake this easier - and we might integrate reflection at some point - but for now, frameworks should take care to either dispose or safely migrate structs that change.We expect folks to use Subsecond outside of Dioxus, namely in web development, so we’ve provided a few starter-integrations for popular libraries:
Subsecond has already made its way into popular projects like Bevy and Iced. Right now, you can
git pullthe latest Bevy and Iced repositories and start hot-patching with zero setup:bevy-hotpatch.mp4
Hot-patching covers nearly every case in Dioxus. Many tasks that were previously massively burdensome are now a breeze:
asset!()callonclickoronmouseoverUnder the hood, we implemented a form of incremental linking / binary patching tailored for running apps. This is not too distant from the idea laid out by Andrew Kelley for Zig.
Dioxus Native and Blitz
We’re extremely excited to announce the first-ever version of Dioxus Native: our new renderer that paints Dioxus apps entirely on the GPU with WGPU.
Out of the box, it already supports a huge number of features
Dioxus Native required a monumental amount of work, pushing forward
We’re extremely excited to release Blitz: our modular HTML/CSS rendering engine.
Blitz combines a number of exciting projects to bring customizable HTML rendering engine to everyone. Blitz is a result of collaboration across many projects: Firefox, Google, Servo, and Bevy. We’re leveraging a number of powerful libraries:
Blitz is an extremely capable renderer, often producing results indistinguishable from browsers like Chrome and Safari:
Not every CSS feature is supported yet, with some bugs like incorrect writing direction or the occasional layout quirk. Our support matrix is here: https://blitz.is/status/css
The samples that Blitz can create are quite incredible. Servo’s website:
Hackernews:
The BBC:
We even implemented basic
<form />support, making it possible to search Wikipedia without a full browser:Screen_Recording_2025-05-24_at_16.21.05.mov
Do note that Blitz is still very young and doesn’t always produce the best outputs, especially on pages that require JavaScript to function properly or use less-popular CSS features:
Blitz also provides a pluggable layer for interactivity, supporting actions like text inputs, pluggable widgets, form submissions, hover styling, and more. Here’s Dioxus-Motion working alongside our interactivity layer to provide high quality animations:
Screen_Recording_2025-01-05_at_7.46.14_PM.mov
Bear in mind that Blitz is still considered a “work in progress.” We have not focused on performance
Dioxus Fullstack Overhaul
We completely revamped Dioxus Fullstack, bringing in a new syntax and a whole host of new features.
To start, we've introduced a new
dioxus::serveentrypoint for server apps that enables hot-patching of axum routers:combined-fullstack-hotpatch.mp4
The new syntax upgrades makes it easy to declare stable endpoints with a syntax inspired by the popular Rocket library.
This revamp allows you to use any valid Axum handler as a Dioxus Server Function, greatly expanding what bodies are allowed. This introduces a number of useful utilities like:
ServerEvents<T>typeWebsocketanduse_websocketfor long-lived bidirectional communicationStreaming<T>for arbitrary data streamsForm<T>type andMultipartFormDatafor handling formsFileStreamfor streaming uploads and downloadsAn example of the new APIs in example is this simple websocket handler:
Paired with the
use_websockethook, you can easily send and receive messages directly from your frontend.An example of websockets in action:
fullstack-websockets-with-frame.mp4
Dioxus Primitives - a collection of Radix-UI equivalents
You asked, we listened. Dioxus now has a first-party component library based on the popular JavaScript library, Radix-Primitives. Our library implements 28 foundational components that you can mix, match, customize, and restyle to fit your project. Each component comes unstyled and is fully equipped with keyboard-shortucts, ARIA accessibility, and is designed to work seamlessly across web, desktop and mobile.
Screen_Recording_2025-08-05_at_10.12.14_AM.mov
In addition to the unstyled primitives, the components page includes a shadcn-style version of each primitive with css you can copy into your project to build a component library for your project. You can combine these primitives to create larger building blocks like cards, dashboards and forms.
The community has already started construction on new component variants with an exciting project called Lumenblocks built by the Leaf Computer team.
Stores - a new primitive for nested reactive state
We introduced signals in 0.5 to enable fine grained reactive updates in dioxus. Signals are great for atomic piece of state in a component like a string or number, but they are difficult to use with external or nested state. Stores are a powerful new primitive for nested reactive state in 0.7.
With stores, you can derive a store trait on your data to let you zoom into specific parts of the state:
Stores also include implementations for common data structures like BTreeMap that mark only the changed items as dirty for each operation:
When we remove a directory from the store, it will only rerun the parent component that iterated over the BTreeMap and the child that was removed.
Automatic Tailwind
The community has been asking for automatic Tailwind for a very long time. Finally in Dioxus 0.7,
dxdetects if your project has atailwind.cssfile at the root, and if it does, automatically starts a TailwindCSS watcher for you. You no longer need to manually start or download the Tailwind CLI - everything is handled for you seamlessly in the background:tailwind-inline.mp4
We’ve updated our docs and examples to Tailwind V4, but we’ve also made sure the CLI can handle and autodetect both V3 and V4. Automatic Tailwind support is an amazing feature and we’re sorry for not having integrated it earlier!
Improvements with AI - LLMs.txt and “vibe-coding”
If you’ve kept up with the news recently, it’s become obvious that AI and Large Language Models are taking over the world. The AI world moves quickly with new tools and improvements being released every week. While the reception of LLMs in the Rust community seems to be mixed, we don’t want Dioxus to be left behind!
In Dioxus 0.7, we’re shipping our first step in the AI world with a first-party
llms.txtautomatically generated from the Dioxus documentation! LLMs can easily stay up to date on new Dioxus features and best practices, hopefully reducing hallucinations when integrating with tools like Copilot and Cursor.The latest version of the template also includes an optional set of prompts with context about the latest release of dioxus. The prompts provide condensed information about dioxus for tools that don’t have access to web search or llms.txt integration.
Combined with the Subsecond hot-patching work, users can now more effectively “vibe code” their apps without rebuilding. While we don’t recommend “vibe coding” high-stakes parts of your app, modern AI tools are quite useful for quickly whipping up prototypes and UI.
vibe-code-2.mp4
WASM Bundle Splitting and Lazy Loading
bundle-split.mp4
Integrated Debugger
To date, debugging Rust apps with VSCode hasn’t been particularly easy. Each combination of launch targets, flags, and arguments required a new entry into your
vscode.jsonWith Dioxus 0.7, we wanted to improve debugging, so we’re shipping a debugger integration! While runningdx serve, simply pressdand the current LLDB instance will attach to currently running app. The new debugger integration currently only works with VSCode-based editor setups, but we’d happily accept contributions to expand our support to Neovim, Zed, etc.debugger-dx.mp4
The integrated debugger is particularly interesting since it works across the web, desktop, and mobile. Setting up an Android debugger from VSCode is particularly challenging, and the new integration makes it much easier.
debug-android-vscode.mp4
When launching for the web, we actually open a new Chrome instance with a debugger attached. Provided you download the DWARF symbols extension, Rust symbols will show up properly demangled in the debugger tab instead of confusing function addresses.
debugger-web.mp4
Various Quality of Life Upgrades
We’ve shipped a number of quality-of-life upgrades that don’t necessarily warrant their own section in the release notes.
Now, when you launch a mobile app,
dxwill automatically open the iOS and Android simulator:auto-launch.mp4
Desktop and mobile now have the same development-mode toasts:
mobile-toast.mp4
The log coloring of the CLI and help menus have been upgraded to match cargo and reflect error/warn/debug/info levels:
DX Compatibility with any project
The dioxus CLI “dx” tooling is now usable with any Rust project, not just Dioxus projects! You can use
dxalongside any Rust project, getting a number of awesome features for free:asset!()macrodx serve @​client @​serversupportNotably, Bevy has already integrated support for Subsecond and works well with the new dx:
bevy-scad_.online-video-cutter.com.mp4
We have big plans for
dxand will improve it by adding support for more features:#[test]and#[preview]attributes that work across web, desktop, and mobileImproved Version Management Experience
Dioxus has supported binary installation for quite a while - but we’ve always required users to install
cargo binstalland then runcargo binstall dioxus-cli. Now, we’re dropping thecargo binstallrequirement entirely, making it easy to install the CLI and then keep it updated.To install the CLI:
curl -fsSL https://dioxus.dev/install.sh | bashWhenever the Dioxus team pushes new updates, the CLI will automatically give you a one-time update notification. To update, you can use
When you try to use the dioxus-cli with an incompatible dioxus version, you’ll receive a warning and some instructions on how to update.
Customize AndroidManifest.xml and Info.plist
You can now customize the Info.plist and AndroidManifest.xml files that Dioxus generates for your Android, iOS, and macOS projects. This makes it possible to add entitlements, update permissions, set splash screens, customize icons, and fully tweak your apps for deployment.
ADB Reverse Proxy for Device Hot-Reload
Thanks to community contributions,
dx serve --platform androidnow supports Android devices! You can edit markup, modify assets, and even hot-patch on a real Android device without needing to boot a simulator. This works by leveragingadb reverse, and should help speed up Android developers looking to test their apps on real devices.iPad Support
A small update - Dioxus now properly supports iPad devices! When you
dx serve --platform ioswith an iPad simulator open, your Dioxus app will properly scale and adapt to the iPadOS environment.Basic Telemetry
Over time, the CLI has grown from a simple server that watches for file changes and reruns cargo to a tool that helps you through every stage of your apps lifecycle with support for bundling, asset optimization, hot patching, hot reloading, and translation. As the complexity has grown, so has the surface area for bugs and UX issues. To make the CLI more robust, we have started collecting a minimal set of telemetry data in 0.7. This information will help to catch rare panics, performance issues and trends over time that don’t show up in github issues. All telemetry is anonymized with all personal information stripped. We collect:
dx serve --hot-patch --profile <stripped> --package <stripped>)asset optimization: 2s, linking: 1s, wasm-bindgen: 4s)unwrap() at <stripped>/cli/src/build.rs)HARDWARE_ID=218853676744316928865703503826531902998)TRIPLE=arch64-apple-darwin CI=false DX=0.7.0-alpha.3)For reference, here is a snippet of the telemetry collected over the last week on my installation:
The full logs are available here: http://gist.github.com/ealmloff/815d859bb8c592a72769e958e685f7f2
You can opt-out of telemetry by compiling the CLI with the
disable-telemetryfeature, settingTELEMETRY=falsein your environment variables or runningdx config set disable-telemetry trueExpanded Documentation
We reorganized and expanded the documentation for core concepts in 0.7. The docs now go into more details about important concepts like reactivity, the rendering model of dioxus, and async state in dioxus. The new docs also come with a new look for the docsite with a wider panel that fits more documentation in the screen:
The new docsite also includes search results for rust items from docs.rs for more specific apis:
What's Changed
dx serveby @wdcohttps://github.com/DioxusLabs/dioxus/pull/3818l/3818concat!and other macros in asset path by @dtolnhttps://github.com/DioxusLabs/dioxus/pull/3809l/3809Dioxus.tomlby @DogeDahttps://github.com/DioxusLabs/dioxus/pull/3802l/3802axum_corethat compiles for wasm target exposing server functions and ssr by @conectahttps://github.com/DioxusLabs/dioxus/pull/3840l/3840Clone, PartialEqfor generic components by @cloudshttps://github.com/DioxusLabs/dioxus/pull/3968l/3968HotkeyStateon Global Shortcut Events by @Cryhttps://github.com/DioxusLabs/dioxus/pull/3822l/3822FormData::validby @clouds[https:/Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.