-
Notifications
You must be signed in to change notification settings - Fork 707
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
Turn bin/lib into subcrates within workspace? #1970
Comments
Yeah, this is a reasonable idea, but I'm not sure if it's possible without breaking either binary or library users unfortunately, as both crates would have to have the same name... |
Is your concern that people will run |
Yes, and whether it's widely used, I'm not sure. |
Perhaps a way to solve it gracefully is to create a new crate called Do you think that could work? |
That might be reasonable (sorry for the lag, exams and work :/) |
Done in #2284 |
Bindgen is both library and binary but binary requires certain features which are not needed in build scripts (mainly
clap
). This is handled by features but because of the way features work in Cargo they are turned on by default. This is a footgun for every library author who wishes to use build script as they may forget to turn them on. An example of this case was found inrocksb
.Spliting up library and binary fixes the issue without causing ridiculous compile errors because of missing features.
Alternative: wait eternity until rust-lang/rfcs#3020 is implemented.
The text was updated successfully, but these errors were encountered: