dalek-cryptography / x25519-dalek

X25519 elliptic curve Diffie-Hellman key exchange in pure-Rust, using curve25519-dalek.
BSD 3-Clause "New" or "Revised" License
328 stars 133 forks source link

Unable to build docs with nightly flag #42

Closed dignifiedquire closed 5 years ago

dignifiedquire commented 5 years ago

When building with no-default-feautures, u64_backend std and nightly

    Checking x25519-dalek v0.5.2
error[E0432]: unresolved import `packed_simd`
  --> /Users/dignifiedquire/.cargo/registry/src/github.com-1ecc6299db9ec823/curve25519-dalek-1.1.4/src/backend/vector/avx2/field.rs:43:5
   |
43 | use packed_simd::{i32x8, u32x8, u64x4, IntoBits};
   |     ^^^^^^^^^^^ maybe a missing `extern crate packed_simd;`?
dignifiedquire commented 5 years ago

removing the nightly flags makes it work

hdevalence commented 5 years ago

This is a bug in curve25519-dalek; the problem is that the curve25519-dalek docs use doc_cfg to build the documentation for all possible backends (including the vector backend), but the optional vector backend has a dependency on packed_simd. So Rustdoc tries to build the documentation for the vector backend with a note that "this is only available with target feature blah" but fails on the missing crate, because the vector backend wasn't enabled and so its dependency wasn't pulled in.

hdevalence commented 5 years ago

@QuietMisdreavus suggests adding a doc feature to curve25519-dalek that enables packed_simd

hdevalence commented 5 years ago

Closing this issue in favor of the curve25519-dalek issue linked above.