Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update rust crate dioxus to 0.6.0 #53

Merged
merged 2 commits into from
Jan 5, 2025
Merged

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jan 5, 2025

This PR contains the following updates:

Package Type Update Change
dioxus (source) dependencies minor 0.5.6 -> 0.6.0

Release Notes

DioxusLabs/dioxus (dioxus)

v0.6.1: Dioxus v0.6.1

Compare Source

Dioxus 0.6.1: Bug fixes

This patch release fixes a number of issues during the 1st week of Dioxus 0.6 release.

Make sure you update your dioxus-cli!

cargo binstall dioxus-cli --version 0.6.1 --force

Also make sure to run cargo update to take advantage of the fixes in your app itself.

A list of the fixes

  • The CLI now installs the proper wasm-bindgen version dynamically instead of requiring a new download of dx
  • Our asset hot-reload is more resilient on web, fixing an issue where we accidentally broke some query parameters
  • Windows asset canonicalization is fixed (unc paths!) with manganis, fixing asset hot-reload
  • Our docs.rs build was failing due to our platform support list being wrong, this is fixed now
  • Android asset hot-reloading has been fixed/improved. The old version relied on the emulator being launched with su while the new one uses the /tmp directory to store hot-reloaded assets.
  • Occasionally toasts would be triggered but not inside the Dioxus runtime, leading to some panics
  • The "starting rebuild" toast wasn't being sent in some cases, this is fixed.
  • Sometimes the CLI would swallow cargo logs - this is fixed
  • The CLI now suggest to toggle trace mode for more information
  • The CLI now suggests to run the tailwind CLI if your project uses tailwind
  • Occasionally links in liveview would cause a full reload, this is fixed
  • We fixed a frame clipping issue with the CLI inline viewport
  • onmounted no longer fires multiple times

What's Changed

Full Changelog: DioxusLabs/dioxus@v0.6.0...v0.6.1

v0.6.0: Dioxus 0.6

Compare 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:

image

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:

  • You can manually rebuild your app by pressing r
  • You can toggle the log level of the CLI output on the fly and even inspect Cargo internal logs
  • We output all internal logs of the CLI so you can debug any issues
  • We capture logs for WASM tracing and panics
  • We dropped the outdir concept and instead use target/dx for all output.
    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.

image

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:

image

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.
image

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:
image

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:

rsx! {
    img { src: asset!("/assets/image.png") }
}

More

Read the entire release post for a full overview: https://dioxuslabs.com/blog/release-060

What's Changed


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.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Summary by Sourcery

New Features:

  • Upgrade Dioxus to 0.6.0, which includes a complete overhaul of the Dioxus CLI with features like serving apps on mobile simulators and devices, magical hot-reloading, interactive CLI, inline stack traces, server functions for native, toasts and loading screens, improved autocomplete, asset stabilization, streaming HTML, SSG and ISG, error handling with ?, meta elements, synchronous prevent_default, onresize event handler, onvisible event handler, WGPU integration, dx bundle for Web, iOS, and Android, json mode, new templates, nightly tutorial and guides, and binary patching prototype.

Copy link

height bot commented Jan 5, 2025

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

Copy link

sourcery-ai bot commented Jan 5, 2025

Reviewer's Guide by Sourcery

This PR updates the Dioxus Rust crate from version 0.5.6 to 0.6.0. This update brings a rewritten CLI, improved hot reloading, enhanced autocomplete for RSX, inline WASM stack traces, toasts and loading screens for web apps, fullstack support for desktop and mobile, a stabilized asset system, Suspense boundaries, improved error handling, new document elements, synchronous prevent_default, new event handlers, WGPU integration, and more.

Sequence diagram for new hot reloading process in Dioxus 0.6.0

sequenceDiagram
    participant Dev as Developer
    participant CLI as Dioxus CLI
    participant HR as Hot Reload Engine
    participant App as Application

    Dev->>CLI: Make code changes
    CLI->>HR: Detect changes
    HR->>HR: Parse changes
    alt Supported Change
        HR->>App: Hot reload changes
        App->>App: Update UI
        App-->>Dev: Show toast notification
    else Unsupported Change
        HR->>App: Trigger full reload
        App->>App: Rebuild application
    end
Loading

File-Level Changes

Change Details Files
Updated the Dioxus crate to 0.6.0
  • Changed the version of the Dioxus dependency from 0.5.6 to 0.6.0
Cargo.toml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

coderabbitai bot commented Jan 5, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have skipped reviewing this pull request. It seems to have been created by a bot (hey, renovate[bot]!). We assume it knows what it's doing!

Copy link

trag-bot bot commented Jan 5, 2025

👋 Hey! As a free user, you're receiving reviews for every 5th PR. Upgrade to get reviews on every pull request and boost your code quality! Learn more here 🚀

Copy link

trag-bot bot commented Jan 5, 2025

Pull request summary

  • Updated the dioxus dependency version from 0.5.6 to 0.6.0 in Cargo.toml.
  • Updated the dioxus-router dependency version from 0.5.6 to 0.6.1 in Cargo.toml.
  • Modified multiple dependencies in Cargo.lock to their latest versions, including base64, http, and tokio.
  • Removed deprecated dependencies such as async-executor, async-fs, and async-net from Cargo.lock.
  • Added new dependencies like const-serialize, const-serialize-macro, and lazy-js-bundle in Cargo.lock.
  • Updated several dependencies to their latest versions, including windows, ndk, and gloo-net.
  • Ensured compatibility with updated versions of dioxus and its related packages.
  • Cleaned up unused or outdated dependencies to streamline the project.
  • Adjusted dependency versions for consistency across the project, ensuring all packages are aligned with the latest releases.
  • Enhanced the overall dependency management by updating to the latest stable versions, improving maintainability.

Copy link

trag-bot bot commented Jan 5, 2025

Pull request summary

  • Updated the dioxus dependency version from 0.5.6 to 0.6.0 in Cargo.toml.
  • Updated the dioxus-router dependency version from 0.5.6 to 0.6.1 in Cargo.toml.
  • Modified multiple dependencies in Cargo.lock to their latest versions, including base64, http, and tokio.
  • Removed deprecated dependencies such as async-executor, async-fs, and async-net from Cargo.lock.
  • Added new dependencies like const-serialize, const-serialize-macro, and lazy-js-bundle to Cargo.lock.
  • Updated several existing dependencies to their latest versions, ensuring compatibility with the new dioxus version.
  • Adjusted dependency versions for windows, windows-core, and related packages to maintain consistency.
  • Cleaned up unused or outdated dependencies to streamline the project.
  • Ensured that all dependencies are compatible with the updated versions of dioxus and dioxus-router.
  • Verified that the changes do not introduce any breaking changes or compatibility issues.

Copy link
Contributor Author

renovate bot commented Jan 5, 2025

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

⚠️ Warning: custom changes will be lost.

Copy link

sonarqubecloud bot commented Jan 5, 2025

@mergify mergify bot merged commit 6fca15c into main Jan 5, 2025
10 of 12 checks passed
@mergify mergify bot deleted the renovate/dioxus-0.x branch January 5, 2025 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants