-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 specific features to be used for all examples via Cargo.toml #12658
Comments
To enable a Cargo feature, use |
Thanks, so there is no way to configure a specific feature to be used for all examples via Cargo.toml? |
So far as I am aware of, no. There are some relevant issues/RFCs, but none of them configure features for all examples. Apart from convenience, is there any other reason you'd like to specify the same feature sets for all examples? It would be great if you could share the exact use case of it. |
Here is my typical scenario
|
Just read your project a bit. I can see the challenge inside. However, a unit test in Cargo is actually a thing in Rust compiler, specifically I can also see the inconvenience. One way to avoid the |
Personally, I tend not to add such a feature, but will leave this open for now to see if people have opinion about configuring cargo targets globally/by “target kind”. |
I am developing a TUI Additionally, some docs are just not compiled without enabling their feature. Crate authors might see that some docs don't appear because they didn't set |
You can add your crate to its own |
This appears to be a duplicate of #6945 and so I'm closing in favor of that. If there is something I missed, let us know! |
Problem
Trying to add
this to my cargo.toml however
after adding above I am amble to run and compile tests which require "unittest" feature but not able to run anything under "examples" folder which depends on this feature until I add explicit add this
Steps
No response
Possible Solution(s)
No response
Notes
No response
Version
No response
The text was updated successfully, but these errors were encountered: