p3_goldilocks/
lib.rs

1//! The prime field known as Goldilocks, defined as `F_p` where `p = 2^64 - 2^32 + 1`.
2
3#![no_std]
4#![cfg_attr(
5    all(
6        feature = "nightly-features",
7        target_arch = "x86_64",
8        target_feature = "avx512f"
9    ),
10    feature(stdarch_x86_avx512)
11)]
12
13extern crate alloc;
14
15mod extension;
16mod goldilocks;
17mod mds;
18mod poseidon2;
19
20pub use goldilocks::*;
21pub use mds::*;
22pub use poseidon2::*;
23
24#[cfg(all(
25    target_arch = "x86_64",
26    target_feature = "avx2",
27    not(all(feature = "nightly-features", target_feature = "avx512f"))
28))]
29mod x86_64_avx2;
30
31#[cfg(all(
32    target_arch = "x86_64",
33    target_feature = "avx2",
34    not(all(feature = "nightly-features", target_feature = "avx512f"))
35))]
36pub use x86_64_avx2::*;
37
38#[cfg(all(
39    feature = "nightly-features",
40    target_arch = "x86_64",
41    target_feature = "avx512f"
42))]
43mod x86_64_avx512;
44
45#[cfg(all(
46    feature = "nightly-features",
47    target_arch = "x86_64",
48    target_feature = "avx512f"
49))]
50pub use x86_64_avx512::*;