Update Rust crate dioxus to 0.6.0 #4
+384
−459
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.5.6
->0.6.0
Release Notes
DioxusLabs/dioxus (dioxus)
v0.6.0
: Dioxus 0.6Compare Source
Dioxus 0.6
Dioxus is a framework for building fullstack web, desktop, and mobile apps with a single codebase. Our goal is to build a "Flutter but better." Dioxus focuses on first-class fullstack web support, type-safe server/client communication, and blazing fast performance.
With this release, we focused on making Dioxus easier to use, improving the developer experience, and fixing bugs.
Headlining the release is a complete overhaul of the Dioxus CLI:
We also improved the developer experience across the entire framework, fixing long standing bugs and improving tooling:
Interactive Command Line Tools
Dioxus 0.6 is shipping with a completely overhauled CLI experience! We’ve completely rewritten the CLI to support a ton of new features and improve stability:
The new CLI sports live progress bars, animations, an interactive filter system, the ability to change log levels on the fly, and more.
cli-new-a4f046c37f262d83.mp4
The CLI rewrite alone took more than half this release cycle. We went through several different design iterations and solved tons of bugs along the way. A few of the highlights:
r
Inline support for iOS and Android emulators.
Android and iOS support for dx serve
With Dioxus 0.6, the dioxus CLI supports dx serve --platform ios/android out of the box! 🎉
While Dioxus has always had mobile, the Rust tooling for mobile has been extremely unstable. Users constantly ran into issues with tools like cargo-mobile and cargo-mobile2. These tools, while useful, take a different architectural approach than what is a good fit for Dioxus.
With this release, we wrote our entire mobile tooling system from scratch. Now, you can go from dx new to dx serve --platform ios in a matter of seconds.
The Android and iOS simulator targets support all the same features as desktop: hot-reloading, fast rebuilds, asset bundling, logging, etc. Dioxus is also the only Rust framework that supports main.rs for mobile - no other tools have supported the same main.rs for every platform until now.
Our inline mobile support requires no extra configurations, no manual setup for Gradle, Java, Cocoapods, and no other 3rd party tooling. If you already have the Android NDK or iOS Simulator installed, you currently are less than 30 seconds away from a production-ready mobile app written entirely in Rust.
dxnew-6ae881e7cb312845.mp4
Completely Revamped Hot-Reloading
We shipped massive improvements to the hot-reloading engine powering Dioxus. Our internal goal was to iterate on the Dioxus Docsite with zero full rebuilds.
This means we needed to add support for a number of new hot-reloading engine changes:
Hot-reload formatted strings
Hot-reload nested rsx blocks
Hot-reload component properties and simple Rust expressions
Hot-reload mobile platforms and their bundled assets
The new hot-reloading engine almost feels like magic - you can quickly iterate on new designs - and even modify simple Rust code! - without waiting for full rebuilds:
dogapphr2-e0c61cc8f7dab6f1.mp4
Completely Revamped Autocomplete
Another huge overhaul in Dioxus 0.6: greatly improved autocomplete of rsx! {}. Our old implementation of rsx! {} suffered from poor integration with tools like Rust-analyzer which provide language-server integration for your code. If the input to the macro wasn’t perfectly parsable, we failed to generate any tokens at all, meaning rust-analyzer couldn’t jump in to provide completions.
The work to fix this was immense. Macro parsing libraries like syn don’t provide great facilities for “partial parsing” Rust code which is necessary for implementing better errors and autocomplete. We had to rewrite the entire internals of rsx! {} to support partial parsing of rsx! {} , but finally, in 0.6, we’re able to provide stellar autocomplete. Not only can we autocomplete Rust code in attribute positions, but with a few tricks, we’re able to automatically insert the appropriate braces next to element names:
Inline WASM stacktraces and tracing integration
Along with the rewrite of the CLI, we shipped a tracing integration for WASM apps that captures panics and logs and sends them dx in your terminal. When you build your app with debug symbols, stack traces directly integrate with your editor, allowing you to jump directly to the troublesome files from within your terminal.
Toasts and Loading Screens
As part of our CLI overhaul, we wanted to provide better feedback for developers when building web apps. Dioxus 0.6 will now show Popup Toasts and Loading Screens for web apps in development mode.
Now, when your app is building, Dioxus will render a loading screen with the current progress of the build:
Fullstack Desktop and Mobile
Additionally, we properly integrated server functions with native apps. Server functions finally work out-of-the-box when targeting desktop and mobile:
native-serverfn12-c825c80078382054.mp4
Stabilizing Manganis asset!() system
We introduced our new asset system, Manganis, in an alpha state with the 0.5 release. Dioxus 0.6 stabilizes the asset system and fixes several bugs and performance issues. You can try out the new linker based asset system by including an asset! anywhere in your code. It will automatically be optimized and bundled across all platforms:
More
Read the entire release post for a full overview: https://dioxuslabs.com/blog/release-060
What's Changed
#[doc]
field attributes inProps
derive macro by @MrGVSV in https://github.com/DioxusLabs/dioxus/pull/2456RwLock::try_read
withRwLock::read
inSyncStorage
by @ribelo in https://github.com/DioxusLabs/dioxus/pull/2463#[props(into)]
on Strings by @ealmloff in https://github.com/DioxusLabs/dioxus/pull/2501dioxus_desktop::Config
to also allow for asynchronous custom protocol handlers by @d3rpp in https://github.com/DioxusLabs/dioxus/pull/2535README.md
Aboutcli-dev
Profile by @DogeDark in https://github.com/DioxusLabs/dioxus/pull/2560for/if/body
, formatted strings, literals, component props, nested rsx, light CLI rewrite, cli TUI by @jkelleyrtp in https://github.com/DioxusLabs/dioxus/pull/2258impl Fn()
instead of a function pointer by @oskardotglobal in https://github.com/DioxusLabs/dioxus/pull/2583expect
error messages by @matthunz in https://github.com/DioxusLabs/dioxus/pull/2629debug_assertions
incore::tasks
by @matthunz in https://github.com/DioxusLabs/dioxus/pull/2703always_on_top
CLI Setting by @DogeDark in https://github.com/DioxusLabs/dioxus/pull/2715p
option forpackage
to matchcargo
by @matthunz in https://github.com/DioxusLabs/dioxus/pull/2738--package
to Cargo #1547 by @matthunz in https://github.com/DioxusLabs/dioxus/pull/2740dx fmt
by @matthunz in https://github.com/DioxusLabs/dioxus/pull/2745WebEventExt
by @matthunz in https://github.com/DioxusLabs/dioxus/pull/2707EvalError
implError
by @DogeDark in https://github.com/DioxusLabs/dioxus/pull/2768use_callback
by @matthunz in https://github.com/DioxusLabs/dioxus/pull/2774#[component]
macro by @tigerros in https://github.com/DioxusLabs/dioxus/pull/2289onresize
event handler to Element by @ASR-ASU in https://github.com/DioxusLabs/dioxus/pull/2479Error parsing user_event: Error("EOF while parsing a value", line: 1, column: 0)
by @ASR-ASU in https://github.com/DioxusLabs/dioxus/pull/2856Coroutine
by @marc2332 in https://github.com/DioxusLabs/dioxus/pull/2895Coroutine
" by @marc2332 in https://github.com/DioxusLabs/dioxus/pull/2899aspect-ratio
property by @ASR-ASU in https://github.com/DioxusLabs/dioxus/pull/2916async_std::task::sleep
instead oftokio::time::sleep
in examples by @ASR-ASU in https://github.com/DioxusLabs/dioxus/pull/2912tokio::time::sleep
->async_std::task::sleep
) by @ASR-ASU in https://github.com/DioxusLabs/dioxus/pull/2939disabled
,form
andname
attributes to fieldset by @chungwong in https://github.com/DioxusLabs/dioxus/pull/2947flake.nix
by @srid in https://github.com/DioxusLabs/dioxus/pull/2910Configuration
📅 Schedule: Branch creation - "* 0-3 * * 1" (UTC), 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.