coord-rs icon indicating copy to clipboard operation
coord-rs copied to clipboard

coord is not actually no_std compatible

Open cbiffle opened this issue 6 years ago • 3 comments
trafficstars

Despite being tagged on crates.io, coord is not no_std compatible because of a transitive dependency on std through the num-traits crate.

It looks like the continuous build is only building on Travis's default target (which I'm guessing is x86-64 linux?). Crates that set #[no_std] can still access the std crate if available. To test, try a bare metal target. For example:

$ rustup target add thumbv7em-none-eabihf
$ git clone https://github.com/zesterer/coord-rs.git
$ cd coord-rs
$ cargo build --target thumbv7em-none-eabihf

You'll get an error like the following:

    Checking rustc-serialize v0.3.24
    Checking rand v0.4.6
   Compiling num-iter v0.1.37
    Checking num-traits v0.2.6
error[E0463]: can't find crate for `std`
  |
  = note: the `thumbv7em-none-eabihf` target may not be installed

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error: Could not compile `rand`.
warning: build failed, waiting for other jobs to finish...
error[E0463]: can't find crate for `std`
  |
  = note: the `thumbv7em-none-eabihf` target may not be installed

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error[E0463]: can't find crate for `std`
  --> /home/cbiffle/.cargo/registry/src/github.com-1ecc6299db9ec823/num-traits-0.2.6/src/lib.rs:21:1
   |
21 | extern crate std;
   | ^^^^^^^^^^^^^^^^^ can't find crate
   |
   = note: the `thumbv7em-none-eabihf` target may not be installed

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error: Could not compile `rustc-serialize`.
warning: build failed, waiting for other jobs to finish...
error: Could not compile `num-traits`.

cbiffle avatar Feb 02 '19 22:02 cbiffle

Whoops! Sorry about that.

I should probably yank this crate and mark it as deprecated (for the time being). Another crate, vek, has a virtually identical API and objectives, while being far further along the development path. I strongly recommend using it!

zesterer avatar Feb 03 '19 00:02 zesterer

Tried vek first; same issue there. :-)

cbiffle avatar Feb 03 '19 00:02 cbiffle

The maintainer generally responds rapidly, so hopefully the issue can be resolved there. As for coord... it's now yanked.

zesterer avatar Feb 03 '19 00:02 zesterer