thumbv7em-none-eabihf target installed,
$ rustup target add thumbv7em-none-eabihf
and the following in Cargo.toml,
[dependencies] heapless = "0.5.1" [dev-dependencies] bindgen = "0.52.0"
#![no_std] lib (there's really nothing else!) doesn't compile:
$ cargo build --target=thumbv7em-none-eabihf Compiling byteorder v1.3.2 error[E0463]: can't find crate for `std` | = note: the `thumbv7em-none-eabihf` target may not be installed
It compiles fine if I comment out any of these two dependencies, however. If I understand correctly, the issue is that both
heapless indirectly depend on
byteorder of different versions (std vs no-std):
$ cargo tree └── heapless v0.5.1 . . . └── hash32 v0.1.1 └── byteorder v1.3.2 <- this is default-features = false [dev-dependencies] └── bindgen v0.52.0 . . . ├── rustc-hash v1.0.1 │ └── byteorder v1.3.2 (*) <- but this includes std . . .
The only way I found to resolve this is to vendor the
byteorder crate and disable its default feature:
# Cargo.toml [features] -default = ["std"] +default = 
- Is there a better way (i.e. without vendoring any crates to me)?
- Is this error expected?