Skip to content

Use different release profiles for desktop and server builds, adhoc profiles #3693

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

Merged
merged 12 commits into from
Jun 19, 2025

Conversation

ealmloff
Copy link
Member

@ealmloff ealmloff commented Feb 4, 2025

In release builds, both desktop and server builds were using the same target and profile so they output their binary to the same location. This was causing either the server or the client to be used for both bundles. This PR fixes the issue by introducing release variants of the desktop and server profiles. Now when the server and desktop targets are built they output to a separate profile folder inside of /target

Fixes #3689
Fixes #3600
Fixes #3573
Fixes #3884
Fixes #4168

@ealmloff ealmloff added bug Something isn't working desktop Suggestions related to the desktop renderer cli Related to the dioxus-cli program fullstack related to the fullstack crate labels Feb 4, 2025
@ealmloff ealmloff requested a review from a team as a code owner February 4, 2025 23:38
@ealmloff ealmloff requested a review from jkelleyrtp April 21, 2025 14:35
@jkelleyrtp
Copy link
Member

jkelleyrtp commented Jun 19, 2025

I was chatting with the bevy folks about #4168 and they pointed me to some code that lets you create adhoc profiles. They do it here:

https://github.com/TheBevyFlock/bevy_cli/blob/main/src%2Fweb%2Fprofiles.rs

Since this PR has sat here so long and I've neglected to merge it, I'll adjust it so it doesn't generate profiles anymore, but instead just uses the adhoc profile approach.

Sorry for refusing to merge it, but I guess it worked out since we found a better solution.

It's worth noting that we should document these profiles.

@jkelleyrtp jkelleyrtp changed the title Use different release profiles for desktop and server builds Use different release profiles for desktop and server builds, adhoc profiles Jun 19, 2025
@jkelleyrtp jkelleyrtp merged commit 7d2a3aa into DioxusLabs:main Jun 19, 2025
18 of 19 checks passed
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 desktop Suggestions related to the desktop renderer fullstack related to the fullstack crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't insert configuration into Cargo.toml when using the CLI just for hot-patching / subsecond Bundled fullstack app for macOS crashes on server request Bundled fullstack desktop apps don't work (Linux, Windows) dx bundle does not respect --profile dx bundle maybe bundle the wrong desktop binary file
2 participants