jonas-schievink / rubble

(going to be a) BLE stack for embedded Rust
BSD Zero Clause License
397 stars 56 forks source link

-hal crate configuration conflict #88

Closed onelson closed 4 years ago

onelson commented 4 years ago

Hi!

I'm trying to use rubble in combination with the dwm1001 crate, but it looks like in order to do so, the nrf52832-hal crate, a mutual dependency, needs to be configured with the same features across the board or the project fails to compile.

error: failed to run custom build command for `nrf52832-hal v0.8.1`                                                 

Caused by:                                                                                                          
  process didn't exit successfully: `/home/owen/projects/embedded-trainings/beginner-lite/templates/segment-1/target
/debug/build/nrf52832-hal-7553567355a8bf89/build-script-build` (exit code: 101)                                     
--- stderr                                                                                                          
thread 'main' panicked at '                                                                                         

Must select exactly one package for linker script generation!                                                       
Choices: 'xxAA-package' or 'xxAB-package'                                                                           

', /home/owen/.cargo/registry/src/github.com-1ecc6299db9ec823/nrf52832-hal-0.8.1/build.rs:12:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

I noticed that rubble uses the default features:

whereas the dwm1001 crate elects to specify something else:

I was able to clone rubble and modify the manifest to align the feature selection and my project compiles, but this is as far as I've gone to troubleshoot.

Seems like it may be possible to expose features in rubble-nrf52 to allow dependents to control this, but I'm not sure of the impact of doing this.

That's all I know - looking for input on how to proceed. Thanks for your work on this!

jonas-schievink commented 4 years ago

Yeah, rubble-nrf52 should not enable the default features (or at least, not unconditionally). Thanks for looking into this!