mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-04 20:24:10 +00:00
As suggested in #453 it is sometimes feasible to select the backend bits via an override. This change provides `cfg(curve25519_dalek_bits)` to override the bits used in serial or fiat target backend.
15 lines
524 B
Rust
15 lines
524 B
Rust
//! This selects the curve25519_dalek_bits either by default from target_pointer_width or explicitly set
|
|
|
|
fn main() {
|
|
#[cfg(any(
|
|
all(not(target_pointer_width = "64"), not(curve25519_dalek_bits = "64")),
|
|
curve25519_dalek_bits = "32"
|
|
))]
|
|
println!("cargo:rustc-cfg=curve25519_dalek_bits=\"32\"");
|
|
|
|
#[cfg(any(
|
|
all(target_pointer_width = "64", not(curve25519_dalek_bits = "32")),
|
|
curve25519_dalek_bits = "64"
|
|
))]
|
|
println!("cargo:rustc-cfg=curve25519_dalek_bits=\"64\"");
|
|
}
|