Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: don't set macos deployment target in dev#14083

Merged
lucasfernog merged 4 commits into
devfrom
fix/macos-target-dev
Aug 27, 2025
Merged

fix: don't set macos deployment target in dev#14083
lucasfernog merged 4 commits into
devfrom
fix/macos-target-dev

Conversation

@FabianLars
Copy link
Copy Markdown
Member

fixes #11577 Also interesting: rust-lang/cargo#13115

@lucasfernog i'm really indecisive about this. Do we want to try to "fix" it for all current users (this PR)? Or would you prefer if we'd add a .cargo/config.toml file to all our templates that sets the env var?
Or do you perhaps have another idea?

@FabianLars FabianLars requested a review from a team as a code owner August 25, 2025 15:17
@lucasfernog
Copy link
Copy Markdown
Member

in the large projects i've built i always set the env var in the .cargo/config.toml file, but this is a very good idea
i think we should do both - so local builds also do not reset the cache

Comment thread .changes/skip-deployment-target-in-dev.md Outdated
Comment thread .changes/skip-deployment-target-in-dev.md Outdated
@github-actions
Copy link
Copy Markdown
Contributor

Package Changes Through b8f5bd5

There are 3 changes which include tauri-build with patch, tauri-cli with patch, @tauri-apps/cli with patch

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
tauri-build 2.4.0 2.4.1
tauri 2.8.4 2.8.5
@tauri-apps/cli 2.8.3 2.8.4
tauri-cli 2.8.3 2.8.4

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

@FabianLars
Copy link
Copy Markdown
Member Author

i think we should do both - so local builds also do not reset the cache

we can't do both, that would overwrite this PR

@FabianLars
Copy link
Copy Markdown
Member Author

unless you mean, this PR for those who didn't set the env and the env for the new projects, that would indeed make sense. sorry i should go to bed x)

@lucasfernog
Copy link
Copy Markdown
Member

unless you mean, this PR for those who didn't set the env and the env for the new projects

that's right

@lucasfernog lucasfernog merged commit c23bec6 into dev Aug 27, 2025
27 checks passed
@lucasfernog lucasfernog deleted the fix/macos-target-dev branch August 27, 2025 20:07
@JeffTsang
Copy link
Copy Markdown
Contributor

This PR breaks macos apps that use swift-rs. It seems that swift-rs needs the deployment target to be set.

@FabianLars
Copy link
Copy Markdown
Member Author

Hmm, in my opinion this isn't our responsibility. Other crates like cc-rs / cmake-rs whatever have fallback values. I would have expected it to work already since you need to set the version in SwiftLinker::new. I guess this is the relevant issue on their side: Brendonovich/swift-rs#68

@JeffTsang
Copy link
Copy Markdown
Contributor

Given that swift-rs is the only way to run swift code on macos, it would be nice to maintain compatibility until the deployment target issues are fixed on their side or until tauri provides another way to run swift code on macos. For example, would you consider adding a setting to tauri.conf.json to set the macos deployment target in dev?

@FabianLars
Copy link
Copy Markdown
Member Author

Nah a setting doesn't make sense, at that point I'd rather add it back and tell people to add a cargo env if they have recompilation issues.

Is it enough to insert the cargo instruction in your app's build.rs file or does swift-rs need the env var set by the tauri cli? (This PR disabled both).

@JeffTsang
Copy link
Copy Markdown
Contributor

Inserting the cargo instruction in build.rs works.

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.

[bug] Tauri unilaterally overrides MACOSX_DEPLOYMENT_TARGET, causes sys crates to spuriously rebuild

3 participants