Skip to content

Conversation

@moubctez
Copy link
Contributor

Cargo.toml allows binary target definition to contain required-features field (see The Cargo Book). If defined, the binary is built only when a certain feature is activated.

Tauri pulls the list of binaries from Cargo.toml regardless of the presence of the required-features field and tries to add them to the final package. But the binaries may not be there.

This pull request addresses this problem.

Example excerpt from Cargo.toml:

[[bin]]
name = "defguard-client"

[[bin]]
name = "defguard-service"
required-features = ["service"]

Example build with cargo-tauri:

cargo tauri build

The above will exclude defguard-service from the final package, while this:

cargo tauri build --features service

will include all binaries.

@moubctez moubctez requested a review from a team as a code owner October 28, 2025 10:05
@github-project-automation github-project-automation bot moved this to 📬Proposal in Roadmap Oct 28, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Oct 28, 2025

Package Changes Through 095d43d

There are 3 changes which include tauri-bundler 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-bundler 2.7.2 2.7.3
@tauri-apps/cli 2.9.2 2.9.3
tauri-cli 2.9.2 2.9.3

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
Member

thanks for the pr! would you mind adding a small changefile as well please?

@moubctez
Copy link
Contributor Author

thanks for the pr! would you mind adding a small changefile as well please?

Done

@FabianLars FabianLars merged commit 779612a into tauri-apps:dev Nov 4, 2025
13 checks passed
@github-project-automation github-project-automation bot moved this from 📬Proposal to 🔎 In audit in Roadmap Nov 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🔎 In audit

Development

Successfully merging this pull request may close these issues.

2 participants