-
Notifications
You must be signed in to change notification settings - Fork 87
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
Update bindgen #292
base: master
Are you sure you want to change the base?
Update bindgen #292
Conversation
Updating to get solution for rust-lang/rust-bindgen#2312. Signed-off-by: Hannes Weisbach <[email protected]>
b377b7a
to
5f06d1d
Compare
Edit: changed from 0.71.1 down to 0.70.0, because 0.71.1 would generate stray "unsafe" keywords. Not sure what's up. 0.70.0 seems to work though. |
It looks like bindings generated with the new version of bindgen are not backwards-compatible. If you want to update bindgen, please run |
Thanks for your feedback! So not quite as straight-forward as I hoped. I want to mention that I get these types of warnings when I run + ./nrf-softdevice-gen/target/release/nrf-softdevice-gen ./softdevice/s140/headers ./nrf-softdevice-s140/src/bindings.rs
Warning: can't set `imports_granularity = Module`, unstable features are only available in nightly channel.
Warning: can't set `group_imports = StdExternalCrate`, unstable features are only available in nightly channel.
Warning: can't set `imports_granularity = Module`, unstable features are only available in nightly channel.
Warning: can't set `group_imports = StdExternalCrate`, unstable features are only available in nightly channel.
+ rustfmt ./nrf-softdevice-s140/src/bindings.rs
Warning: can't set `imports_granularity = Module`, unstable features are only available in nightly channel.
Warning: can't set `group_imports = StdExternalCrate`, unstable features are only available in nightly channel.
+ cd nrf-softdevice-s140
+ cargo build --target thumbv7em-none-eabihf Do you know if they are expected/benign? The new generated bindings do not have as nice formatted docs as the old ones. Instead of multiple lines there is just one The new |
Yes, those warnings are fine. We use some rustfmt options that are only on nightly.
This is more of a problem, because it breaks existing code. In most cases it's also useless because the bitfield is byte aligned anyway. Let me know what you find. |
Updating for a solution for issue rust-lang/rust-bindgen#2312 of rust-bindgen.
I'm in the process to generate bindings for softdevice 332, when I encountered the error
This SO post https://stackoverflow.com/questions/76443280/rust-bindgen-causes-a-is-not-a-valid-ident-error-on-build pointed me to rust-lang/rust-bindgen#2312.
The version bump solves the error above.