binius_field/arch/
mod.rs

1// Copyright 2023-2025 Irreducible Inc.
2
3use cfg_if::cfg_if;
4
5mod arch_optimal;
6mod binary_utils;
7mod shared;
8mod strategies;
9
10cfg_if! {
11	if #[cfg(all(target_arch = "x86_64"))] {
12		#[allow(dead_code)]
13		mod portable;
14
15		mod x86_64;
16		pub use x86_64::{packed_128, packed_256, packed_512, packed_aes_128, packed_aes_256, packed_aes_512, packed_ghash_128, packed_ghash_256, packed_ghash_512};
17	} else if #[cfg(target_arch = "aarch64")] {
18		#[allow(dead_code)]
19		mod portable;
20
21		mod aarch64;
22		pub use aarch64::{packed_128, packed_aes_128, packed_ghash_128};
23		pub use portable::{packed_256, packed_512, packed_aes_256, packed_aes_512, packed_ghash_256, packed_ghash_512};
24	} else if #[cfg(target_arch = "wasm32")] {
25		#[allow(dead_code)]
26		mod portable;
27
28		mod wasm32;
29		pub use wasm32::{packed_ghash_128, packed_ghash_256};
30		pub use portable::{packed_128, packed_256, packed_512, packed_aes_128, packed_aes_256, packed_aes_512, packed_ghash_512};
31	} else {
32		mod portable;
33		pub use portable::{packed_128, packed_256, packed_512, packed_aes_128, packed_aes_256, packed_aes_512, packed_ghash_128, packed_ghash_256, packed_ghash_512};
34	}
35}
36
37pub use arch_optimal::*;
38pub use portable::{
39	packed_1, packed_2, packed_4, packed_8, packed_16, packed_32, packed_64, packed_aes_8,
40	packed_aes_16, packed_aes_32, packed_aes_64,
41};
42pub use strategies::*;