1#![allow(dead_code)]
10
11#[cfg(all(
12 feature = "hotpath-cpu-meta",
13 not(any(target_os = "macos", target_os = "linux"))
14))]
15compile_error!("the `hotpath-cpu-meta` feature is only supported on macOS and Linux");
16
17#[cfg(feature = "hotpath-meta")]
18#[doc(inline)]
19pub use lib_on::*;
20#[cfg(feature = "hotpath-meta")]
21mod lib_on;
22
23#[cfg(all(feature = "hotpath-meta", feature = "threads"))]
24pub use lib_on::threads;
25#[cfg(all(feature = "hotpath-meta", feature = "tokio"))]
26pub use lib_on::tokio_runtime;
27#[cfg(feature = "hotpath-meta")]
28pub use lib_on::{channels, futures, http, io, mutexes, server, sql, streams};
29
30#[cfg(any(feature = "hotpath-meta", feature = "tui"))]
31pub(crate) mod output;
32#[cfg(feature = "hotpath-meta")]
33pub use output::format_debug_truncated;
34#[cfg(any(feature = "hotpath-meta", feature = "tui"))]
35pub use output::{
36 ceil_char_boundary, floor_char_boundary, format_bytes, format_count, format_duration,
37 format_percentile_header, format_percentile_key, format_rate, format_throughput, parse_bytes,
38 parse_count, parse_duration, shorten_function_name, OutputDestination, ProfilingMode,
39 MAX_LOG_LEN,
40};
41
42#[cfg(feature = "hotpath-meta")]
43pub(crate) mod output_on;
44
45#[cfg(feature = "hotpath-meta")]
46pub(crate) mod auth;
47
48#[cfg(feature = "hotpath-meta")]
49pub(crate) mod metrics_server;
50
51#[cfg(feature = "hotpath-mcp-meta")]
52pub(crate) mod mcp_server;
53
54#[allow(dead_code)]
55#[cfg(any(feature = "hotpath-meta", feature = "tui"))]
56pub mod json;
57#[cfg(any(feature = "hotpath-meta", feature = "tui"))]
58pub use json::Route;
59
60#[cfg(feature = "hotpath-meta")]
61#[doc(hidden)]
62pub mod instant;
63#[cfg(feature = "hotpath-meta")]
64pub(crate) mod tid;
65
66#[cfg(not(feature = "hotpath-meta"))]
67#[doc(inline)]
68pub use lib_off::*;
69#[cfg(not(feature = "hotpath-meta"))]
70mod lib_off;
71
72#[cfg(not(feature = "hotpath-meta"))]
73pub use lib_off::{channels, futures, streams, threads};
74
75pub mod wrap {
79 pub mod std {
80 pub mod sync {
81 #[cfg(not(feature = "hotpath-meta"))]
82 pub use crate::lib_off::{
83 mutexes::{Mutex, MutexGuard},
84 rw_locks::{RwLock, RwLockReadGuard, RwLockWriteGuard},
85 };
86 #[cfg(feature = "hotpath-meta")]
87 pub use crate::lib_on::{
88 mutexes::wrapper::std::{Mutex, MutexGuard},
89 rw_locks::wrapper::std::{RwLock, RwLockReadGuard, RwLockWriteGuard},
90 };
91
92 pub mod mpsc {
98 #[cfg(feature = "hotpath-meta")]
99 pub use crate::lib_on::channels::wrapper::std_wrap::{
100 Receiver, Sender, SyncSender,
101 };
102 #[cfg(not(feature = "hotpath-meta"))]
103 pub use std::sync::mpsc::{Receiver, Sender, SyncSender};
104 }
105 }
106 }
107
108 #[cfg(feature = "tokio")]
114 pub mod tokio {
115 pub mod sync {
116 pub mod mpsc {
117 #[cfg(feature = "hotpath-meta")]
118 pub use crate::lib_on::channels::wrapper::tokio_wrap::{
119 Receiver, Sender, UnboundedReceiver, UnboundedSender, WeakSender,
120 WeakUnboundedSender,
121 };
122 #[cfg(not(feature = "hotpath-meta"))]
123 pub use tokio::sync::mpsc::{
124 Receiver, Sender, UnboundedReceiver, UnboundedSender, WeakSender,
125 WeakUnboundedSender,
126 };
127 }
128 }
129 }
130
131 #[cfg(feature = "crossbeam")]
136 pub mod crossbeam {
137 #[cfg(feature = "hotpath-meta")]
138 pub use crate::lib_on::channels::wrapper::crossbeam_wrap::{Receiver, Sender};
139 #[cfg(not(feature = "hotpath-meta"))]
140 pub use crossbeam_channel::{Receiver, Sender};
141 }
142
143 #[cfg(feature = "flume")]
148 pub mod flume {
149 #[cfg(feature = "hotpath-meta")]
150 pub use crate::lib_on::channels::wrapper::flume_wrap::{Receiver, Sender};
151 #[cfg(not(feature = "hotpath-meta"))]
152 pub use flume::{Receiver, Sender};
153 }
154
155 #[cfg(feature = "async-channel")]
160 pub mod async_channel {
161 #[cfg(feature = "hotpath-meta")]
162 pub use crate::lib_on::channels::wrapper::asc_wrap::{Receiver, Sender};
163 #[cfg(not(feature = "hotpath-meta"))]
164 pub use async_channel::{Receiver, Sender};
165 }
166}
167
168mod shared;
169pub use shared::{env_flag, Format, IntoF64, Section};
170
171#[doc(hidden)]
172pub mod dev_logging;