dalek-cryptography / curve25519-dalek

A pure-Rust implementation of group operations on Ristretto and Curve25519
Other
885 stars 449 forks source link

Avoid cargo test -p curve25519-dalek-derive failure on ARM #585

Closed nategraf closed 1 year ago

nategraf commented 1 year ago

On a MacBook M1, I noticed cargo test in the workspace root fails. It fails due to the references to #[target_feature(enable = "avx2")] in the README.md for curve25519-dalek-derive.

This PR avoids the test failure by adding conditional compile statements on the usages of target_feature. cfg statements are added as hidden lines in the examples and so they will not appear in cargo doc. Hidden lines will appear when looking at the README on GitHub.

nategraf commented 1 year ago

Let me know if this seems like the right solution, or if you'd like me to rework it.

tarcieri commented 1 year ago

Seems fine to me