-
Notifications
You must be signed in to change notification settings - Fork 715
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
Adding bindgen to build-dependencies prevents crate from being no_std #1439
Comments
Hmm, this definitely used to work. This looks to have regressed because a few of the bindgen dependencies use |
It's not needed, and prevents some bindgen users from being able to run bindgen at build time in no_std crates, see: rust-lang/rust-bindgen#1439
So this is fixable to some extent, by going through bindgen's dependencies and ensuring that libc isn't built with default features. I just checked and it can be done for some, like clang-sys (KyleMayes/clang-sys#85). Probably we can do the same for all others, or find a way to remove that dependency using a bindgen feature or what not. I cannot commit to do all the work, though I'm happy to help if I find time :) In any case this is rust-lang/cargo#2589. |
I don't think there's something actionable here on bindgen's side, but please reopen if you think otherwise. |
This doesn't really seem intentional, although this might be more of a cargo issue than a bindgen issue.
Minimal example that doesn't work when you add bindgen to build-rependencies:
main.rs:
Cargo.toml:
I used to invoke bindgen via the shell, which would work fine with my no_std crate, but using it in a build.rs prevents me from using no_std at all.
The text was updated successfully, but these errors were encountered: