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

Configure features per target platform #772

Open
frol opened this issue Feb 4, 2024 · 2 comments
Open

Configure features per target platform #772

frol opened this issue Feb 4, 2024 · 2 comments
Labels
feature request New feature or request

Comments

@frol
Copy link
Contributor

frol commented Feb 4, 2024

I am an early user of cargo-dist, and I love it!

It would be great to be able to configure features per target as some of the platforms do not support one thing or another. For example, I don't want to build udev-dependent code for linux-musl-static builds, so I would just disable default-features and enable only the features that make sense for musl-static build.

I wish cargo support it, and then cargo-dist may not need to implement it: rust-lang/cargo#1197

@ashleygwilliams ashleygwilliams added the feature request New feature or request label Feb 21, 2024
@quietvoid
Copy link

quietvoid commented Mar 10, 2024

I'm facing a related issue with the plotters crate.

On Linux, it requires the fontconfig crate by default and offers a built in font with the ab_glyph feature.
In my project I distribute a Linux musl binary without support for system fonts, and build with flags like --no-default-features --features internal-font.

But I'd want to keep system fonts default for the other targets.
cargo-dist doesn't seem to let me do that.

@simonsan
Copy link

simonsan commented Nov 30, 2024

Same here, we have a command, that currently only works on Linux due to fuse dependency. So we have buried that behind the mount feature, but in general, we build with the release feature as a "default".

But we would like to set something like:

[dist]
features = ["release"]

[dist.additional-features]
x86_64-unknown-linux-gnu = ["mount"] 

So artifacts for x86_64-unknown-linux-gnu are build with -F release -F mount.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants