#[cfg(all(
feature = "hotpath-cpu",
not(any(target_os = "macos", target_os = "linux"))
))]
compile_error!("the `hotpath-cpu` feature is only supported on macOS and Linux");
#[cfg(feature = "hotpath")]
#[doc(inline)]
pub use lib_on::*;
#[cfg(feature = "hotpath")]
mod lib_on;
#[cfg(all(feature = "hotpath", feature = "threads"))]
pub use lib_on::threads;
#[cfg(all(feature = "hotpath", feature = "tokio"))]
pub use lib_on::tokio_runtime;
#[cfg(feature = "hotpath")]
pub use lib_on::{channels, futures, mutexes, sql, streams};
#[cfg(any(feature = "hotpath", feature = "utils", feature = "tui"))]
pub(crate) mod output;
#[cfg(feature = "hotpath")]
pub use output::format_debug_truncated;
#[cfg(any(feature = "hotpath", feature = "utils", feature = "tui"))]
pub use output::{
ceil_char_boundary, floor_char_boundary, format_bytes, format_count, format_duration,
format_percentile_header, format_percentile_key, format_rate, parse_bytes, parse_count,
parse_duration, shorten_function_name, OutputDestination, ProfilingMode, MAX_LOG_LEN,
};
#[cfg(feature = "hotpath")]
pub(crate) mod output_on;
#[cfg(feature = "hotpath")]
pub(crate) mod metrics_server;
#[cfg(feature = "hotpath-mcp")]
pub(crate) mod mcp_server;
#[allow(dead_code)]
#[cfg(any(feature = "hotpath", feature = "utils", feature = "tui"))]
pub mod json;
#[cfg(any(feature = "hotpath", feature = "utils", feature = "tui"))]
pub use json::Route;
#[cfg(feature = "hotpath")]
#[doc(hidden)]
pub mod instant;
#[cfg(feature = "hotpath")]
pub(crate) mod tid;
#[cfg(not(feature = "hotpath"))]
#[doc(inline)]
pub use lib_off::*;
#[cfg(not(feature = "hotpath"))]
mod lib_off;
#[cfg(not(feature = "hotpath"))]
pub use lib_off::{channels, futures, streams, threads};
pub mod wrap {
pub mod std {
pub mod sync {
#[cfg(not(feature = "hotpath"))]
pub use crate::lib_off::{
mutexes::{Mutex, MutexGuard},
rw_locks::{RwLock, RwLockReadGuard, RwLockWriteGuard},
};
#[cfg(feature = "hotpath")]
pub use crate::lib_on::{
mutexes::wrapper::std::{Mutex, MutexGuard},
rw_locks::wrapper::std::{RwLock, RwLockReadGuard, RwLockWriteGuard},
};
pub mod mpsc {
#[cfg(feature = "hotpath")]
pub use crate::lib_on::channels::wrapper::std_wrap::{
Receiver, Sender, SyncSender,
};
#[cfg(not(feature = "hotpath"))]
pub use std::sync::mpsc::{Receiver, Sender, SyncSender};
}
}
}
#[cfg(feature = "parking_lot")]
pub mod parking_lot {
#[cfg(not(feature = "hotpath"))]
pub use crate::lib_off::parking_lot::{
Mutex, MutexGuard, RwLock, RwLockReadGuard, RwLockWriteGuard,
};
#[cfg(feature = "hotpath")]
pub use crate::lib_on::{
mutexes::wrapper::parking_lot::{Mutex, MutexGuard},
rw_locks::wrapper::parking_lot::{RwLock, RwLockReadGuard, RwLockWriteGuard},
};
}
#[cfg(feature = "async-lock")]
pub mod async_lock {
#[cfg(not(feature = "hotpath"))]
pub use crate::lib_off::async_lock::{
Mutex, MutexGuard, RwLock, RwLockReadGuard, RwLockWriteGuard,
};
#[cfg(feature = "hotpath")]
pub use crate::lib_on::{
mutexes::wrapper::async_lock::{Mutex, MutexGuard},
rw_locks::wrapper::async_lock::{RwLock, RwLockReadGuard, RwLockWriteGuard},
};
}
#[cfg(feature = "tokio")]
pub mod tokio {
pub mod sync {
#[cfg(not(feature = "hotpath"))]
pub use crate::lib_off::tokio::sync::{
Mutex, MutexGuard, RwLock, RwLockReadGuard, RwLockWriteGuard,
};
#[cfg(feature = "hotpath")]
pub use crate::lib_on::{
mutexes::wrapper::tokio::{Mutex, MutexGuard},
rw_locks::wrapper::tokio::{RwLock, RwLockReadGuard, RwLockWriteGuard},
};
pub mod mpsc {
#[cfg(feature = "hotpath")]
pub use crate::lib_on::channels::wrapper::tokio_wrap::{
Receiver, Sender, UnboundedReceiver, UnboundedSender, WeakSender,
WeakUnboundedSender,
};
#[cfg(not(feature = "hotpath"))]
pub use tokio::sync::mpsc::{
Receiver, Sender, UnboundedReceiver, UnboundedSender, WeakSender,
WeakUnboundedSender,
};
}
}
}
#[cfg(feature = "crossbeam")]
pub mod crossbeam_channel {
#[cfg(feature = "hotpath")]
pub use crate::lib_on::channels::wrapper::crossbeam_wrap::{Receiver, Sender};
#[cfg(not(feature = "hotpath"))]
pub use crossbeam_channel::{Receiver, Sender};
}
#[cfg(feature = "flume")]
pub mod flume {
#[cfg(feature = "hotpath")]
pub use crate::lib_on::channels::wrapper::flume_wrap::{Receiver, Sender};
#[cfg(not(feature = "hotpath"))]
pub use flume::{Receiver, Sender};
}
#[cfg(feature = "async-channel")]
pub mod async_channel {
#[cfg(feature = "hotpath")]
pub use crate::lib_on::channels::wrapper::asc_wrap::{Receiver, Sender};
#[cfg(not(feature = "hotpath"))]
pub use async_channel::{Receiver, Sender};
}
}
mod shared;
pub use shared::{env_flag, Format, IntoF64, Section};
#[doc(hidden)]
pub mod dev_logging;