1#![cfg_attr(feature = "strict", deny(warnings, clippy::all, clippy::pedantic))]
2#![cfg_attr(docsrs, feature(doc_cfg))]
3
4#[cfg(all(not(feature = "liboqs"), not(feature = "mock")))]
5compile_error!("No backend selected. Enable `features=[\"liboqs\"]` for real crypto or `mock` for CI/examples.");
6
7#[cfg(all(feature = "mock", not(debug_assertions)))]
8#[cfg(not(allow_mock_release))]
9compile_error!("`mock` backend in release build. Use RUSTFLAGS='--cfg allow_mock_release' if you truly intend to ship a mock.");
10
11pub mod error;
12pub mod kem;
13pub mod sig;
14
15#[cfg(feature = "liboqs")]
16pub(crate) mod ffi;
17
18#[cfg(feature = "selftest_at_startup")]
19mod selftest;
20
21#[cfg(feature = "selftest_at_startup")]
22#[ctor::ctor]
23fn _oqs_safe_selftest() {
24 let _ = std::panic::catch_unwind(|| selftest::check());
25}
26
27pub use error::OqsError;