-
Notifications
You must be signed in to change notification settings - Fork 201
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
nrfxlib needs bindgen binary to build #444
Comments
@jonathanpallant if bindgen is not packaged on Ubuntu 18.04, it is unlikely this can be fixed. We use https://github.com/rust-lang/crates-build-env for the build environment and it only installs dependencies that are packaged. |
(swapped to my personal account) Hmm, that makes sense. It's packaged for 19.04 - https://packages.ubuntu.com/disco/bindgen. I assume there's no mechanism to |
Ok, in that case we can add it when 20.04 gets released in a few months.
No, because the build environment doesn't have a Rust toolchain installed. |
So, it seems rust-bindgen isn't packaged for focal (20.04) yet. I presume that means someone needs to do some work to package it? |
That's correct. I didn't realize that packages for 19.04 weren't automatically transferred over to 20.04, that seems like a shame. |
Another alternative I just thought of is to install bindgen on the host toolchain with the rest of the toolchain components. Rustwide exposes a cargo command - cc @pietroalbini , if I run |
It should be. |
rust-lang/cargo#5730 is fixed with the new resolver, so you should no longer need this workaround. Eventually rust-lang/rfcs#3028 would allow having a build-dependency on the bindgen binary if for some reason crates want to call it as a CLI instead of a library. I'm going to close this since there are alternatives to having docs.rs install bindgen. |
Indeed. https://docs.rs/nrfxlib/0.6.0/nrfxlib/ rendered correctly using the new resolver. |
Crate name:
nrfxlib
nrfxlib-sys
Build failure link:
https://docs.rs/crate/nrfxlib-sys/0.2.0
https://docs.rs/crate/nrfxlib/0.2.1
Additional details:
I used to use bindgen as a build-dependency to convert my third-party header files to Rust source in nrfxlib-sys. Now I shell out to the bindgen command line tool, to work around Cargo 5730. Is it possible to get bindgen pre-installed in the build environment? I found it was already installed when I used the Rust action on Github.
The text was updated successfully, but these errors were encountered: