//! Unified cryptographic API with target-specific implementations // Check for mutually exclusive override features #[cfg(all(feature = "force-wasm", feature = "force-native"))] compile_error!("Features 'force-wasm' and 'force-native' are mutually exclusive"); // Shared helper functions and types mod shared; // Platform-specific implementations #[cfg(all(not(target_arch = "wasm32"), not(feature = "force-wasm")))] mod native; #[cfg(any(target_arch = "wasm32", feature = "force-wasm"))] mod wasm; // Re-export the unified API #[cfg(all(not(target_arch = "wasm32"), not(feature = "force-wasm")))] pub use native::{Bip39MnemonicGenerator, Ed25519KeyDeriver, XChaCha20FileEncryptor}; #[cfg(any(target_arch = "wasm32", feature = "force-wasm"))] pub use wasm::{Bip39MnemonicGenerator, Ed25519KeyDeriver, XChaCha20FileEncryptor}; // Target-specific tests #[cfg(all(test, all(not(target_arch = "wasm32"), not(feature = "force-wasm"))))] mod native_test; #[cfg(all(test, any(target_arch = "wasm32", feature = "force-wasm")))] mod wasm_test; // Re-export shared types if any pub use shared::*;