Skip to main content

provekit_whir/
lib.rs

1pub mod algebra;
2pub mod ark_serde;
3pub mod bits;
4pub mod cmdline_utils;
5pub mod engines;
6pub mod hash;
7pub mod parameters;
8pub mod protocols;
9pub mod transcript;
10pub mod type_info;
11pub mod type_map;
12pub mod utils; // Utils in general
13
14#[cfg(test)]
15mod tests {
16    use std::sync::Once;
17
18    pub fn init() {
19        static INIT: Once = Once::new();
20
21        #[cfg(not(feature = "tracing"))]
22        INIT.call_once(|| {});
23
24        #[cfg(feature = "tracing")]
25        INIT.call_once(|| {
26            use tracing_subscriber::{fmt, fmt::format::FmtSpan, EnvFilter};
27
28            // Respect RUST_LOG if set, otherwise default for tests.
29            let filter =
30                EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new("debug"));
31
32            // Create a writer compatible with the testing harnesses
33            fmt()
34                .with_env_filter(filter)
35                .with_span_events(FmtSpan::ENTER)
36                .with_test_writer()
37                .init();
38
39            tracing::debug!("Initialized test logger");
40        });
41    }
42}