mirror of
https://github.com/saymrwulf/betrusted-curve25519-dalek-source.git
synced 2026-09-12 21:40:32 +00:00
* Vendor import unsafe_target_features as curve25519-dalek-derive Co-authored-by: Jan Bujak <jan@parity.io> * Remove feature gates from avx2/ifma * Add buildtime compile diagnostics about backend selection * Add build script tests * Documentation changes * Disable simd related features unless simd was determined via build * Add note and test about the override warning when unsuccesful * Reduce complexity in build gating via compile_error --------- Co-authored-by: Jan Bujak <jan@parity.io> Co-authored-by: Michael Rosenberg <michael@mrosenberg.pub>
25 lines
830 B
Rust
25 lines
830 B
Rust
//! Build time diagnostics
|
|
|
|
// auto is assumed or selected
|
|
#[cfg(curve25519_dalek_backend = "auto")]
|
|
compile_error!("curve25519_dalek_backend is 'auto'");
|
|
|
|
// fiat was overriden
|
|
#[cfg(curve25519_dalek_backend = "fiat")]
|
|
compile_error!("curve25519_dalek_backend is 'fiat'");
|
|
|
|
// serial was assumed or overriden
|
|
#[cfg(curve25519_dalek_backend = "serial")]
|
|
compile_error!("curve25519_dalek_backend is 'serial'");
|
|
|
|
// simd was assumed over overriden
|
|
#[cfg(curve25519_dalek_backend = "simd")]
|
|
compile_error!("curve25519_dalek_backend is 'simd'");
|
|
|
|
// 32 bits target_pointer_width was assumed or overriden
|
|
#[cfg(curve25519_dalek_bits = "32")]
|
|
compile_error!("curve25519_dalek_bits is '32'");
|
|
|
|
// 64 bits target_pointer_width was assumed or overriden
|
|
#[cfg(curve25519_dalek_bits = "64")]
|
|
compile_error!("curve25519_dalek_bits is '64'");
|