okstd/
lib.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
pub mod oklog;
// if not wasm
#[cfg(not(target_arch = "wasm32"))]
pub mod okasync;

mod e2e_tests;

use log as rustlog;

pub mod prelude {
    #[cfg(not(target_arch = "wasm32"))]
    pub use crate::okasync::*;

    pub use crate::oklog::setup_logging;

    #[cfg(feature = "macros")]
    pub use super::log;
    #[cfg(feature = "macros")]
    pub use super::main;

    // re-export the slog macros
    pub use crate::rustlog::debug;
    pub use crate::rustlog::error;
    pub use crate::rustlog::info;
    pub use crate::rustlog::trace;
    pub use crate::rustlog::warn;
    pub use fern::*;

    #[cfg(feature = "macros")]
    pub use crate::rustlog::LevelFilter;
    #[cfg(feature = "macros")]
    pub use std::panic::set_hook;

    #[cfg(feature = "argh")]
    pub use argh::*;
}

#[cfg(feature = "macros")]
pub use ok_macros::log;
#[cfg(feature = "macros")]
pub use ok_macros::main;
#[cfg(feature = "macros")]
pub use ok_macros::test;