Skip to content

Conversation

ealmloff
Copy link
Member

Currently if you have a cargo.toml set up like this:

[dependencies]
dioxus = { version = "0.7.0-rc.0", features = ["router"] }

[features]
default = ["web"]
web = ["dioxus/web"]
desktop = ["dioxus/desktop"]

and serve with this command dx serve --platform desktop, dx will disable the web feature and enable the desktop feature flag because the renderer you selected was different than the default

However, that doesn't work if you serve with dx serve --destkop which only sets the target, not the renderer. This PR makes dx serve --desktop work by checking compatibility between the currently set target and the renderer. The implicit web renderer is not compatible with the explicitly set desktop target so dx disables the web renderer just like it does with --platform desktop

@ealmloff ealmloff requested a review from a team as a code owner August 20, 2025 14:04
@ealmloff ealmloff added bug Something isn't working cli Related to the dioxus-cli program labels Aug 20, 2025
@jkelleyrtp
Copy link
Member

I changed all the logic here in #4596 , the user will see different errors now

@jkelleyrtp jkelleyrtp closed this Oct 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cli Related to the dioxus-cli program
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants