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(feature = "hotpath-meta")]
24pub use lib_on::channels;
25#[cfg(feature = "hotpath-meta")]
26pub use lib_on::futures;
27#[cfg(feature = "hotpath-meta")]
28pub use lib_on::mutexes;
29#[cfg(feature = "hotpath-meta")]
30pub use lib_on::sql;
31#[cfg(feature = "hotpath-meta")]
32pub use lib_on::streams;
33#[cfg(all(feature = "hotpath-meta", feature = "threads"))]
34pub use lib_on::threads;
35#[cfg(all(feature = "hotpath-meta", feature = "tokio"))]
36pub use lib_on::tokio_runtime;
37
38#[cfg(any(feature = "hotpath-meta", feature = "tui"))]
39pub(crate) mod output;
40#[cfg(feature = "hotpath-meta")]
41pub use output::format_debug_truncated;
42#[cfg(any(feature = "hotpath-meta", feature = "tui"))]
43pub use output::{
44 ceil_char_boundary, floor_char_boundary, format_bytes, format_count, format_duration,
45 format_percentile_header, format_percentile_key, format_rate, parse_bytes, parse_count,
46 parse_duration, shorten_function_name, OutputDestination, ProfilingMode, MAX_LOG_LEN,
47};
48
49#[cfg(feature = "hotpath-meta")]
50pub(crate) mod output_on;
51
52#[cfg(feature = "hotpath-meta")]
53pub(crate) mod metrics_server;
54
55#[cfg(feature = "hotpath-mcp-meta")]
56pub(crate) mod mcp_server;
57
58#[allow(dead_code)]
59#[cfg(any(feature = "hotpath-meta", feature = "tui"))]
60pub mod json;
61#[cfg(any(feature = "hotpath-meta", feature = "tui"))]
62pub use json::Route;
63
64#[cfg(feature = "hotpath-meta")]
65#[doc(hidden)]
66pub mod instant;
67#[cfg(feature = "hotpath-meta")]
68pub(crate) mod tid;
69
70#[cfg(not(feature = "hotpath-meta"))]
71#[doc(inline)]
72pub use lib_off::*;
73#[cfg(not(feature = "hotpath-meta"))]
74mod lib_off;
75
76#[cfg(not(feature = "hotpath-meta"))]
77pub use lib_off::channels;
78#[cfg(not(feature = "hotpath-meta"))]
79pub use lib_off::futures;
80#[cfg(not(feature = "hotpath-meta"))]
81pub use lib_off::streams;
82#[cfg(not(feature = "hotpath-meta"))]
83pub use lib_off::threads;
84
85pub mod wrap {
89 pub mod std {
90 pub mod sync {
91 #[cfg(not(feature = "hotpath-meta"))]
92 pub use crate::lib_off::mutexes::{Mutex, MutexGuard};
93 #[cfg(not(feature = "hotpath-meta"))]
94 pub use crate::lib_off::rw_locks::{RwLock, RwLockReadGuard, RwLockWriteGuard};
95 #[cfg(feature = "hotpath-meta")]
96 pub use crate::lib_on::mutexes::wrapper::std::{Mutex, MutexGuard};
97 #[cfg(feature = "hotpath-meta")]
98 pub use crate::lib_on::rw_locks::wrapper::std::{
99 RwLock, RwLockReadGuard, RwLockWriteGuard,
100 };
101
102 pub mod mpsc {
108 #[cfg(feature = "hotpath-meta")]
109 pub use crate::lib_on::channels::wrapper::std_wrap::{
110 Receiver, Sender, SyncSender,
111 };
112 #[cfg(not(feature = "hotpath-meta"))]
113 pub use std::sync::mpsc::{Receiver, Sender, SyncSender};
114 }
115 }
116 }
117
118 #[cfg(feature = "tokio")]
124 pub mod tokio {
125 pub mod sync {
126 pub mod mpsc {
127 #[cfg(feature = "hotpath-meta")]
128 pub use crate::lib_on::channels::wrapper::tokio_wrap::{
129 Receiver, Sender, UnboundedReceiver, UnboundedSender,
130 };
131 #[cfg(not(feature = "hotpath-meta"))]
132 pub use tokio::sync::mpsc::{Receiver, Sender, UnboundedReceiver, UnboundedSender};
133 }
134 }
135 }
136
137 #[cfg(feature = "crossbeam")]
142 pub mod crossbeam {
143 #[cfg(feature = "hotpath-meta")]
144 pub use crate::lib_on::channels::wrapper::crossbeam_wrap::{Receiver, Sender};
145 #[cfg(not(feature = "hotpath-meta"))]
146 pub use crossbeam_channel::{Receiver, Sender};
147 }
148
149 #[cfg(feature = "flume")]
154 pub mod flume {
155 #[cfg(feature = "hotpath-meta")]
156 pub use crate::lib_on::channels::wrapper::flume_wrap::{Receiver, Sender};
157 #[cfg(not(feature = "hotpath-meta"))]
158 pub use flume::{Receiver, Sender};
159 }
160
161 #[cfg(feature = "async-channel")]
166 pub mod async_channel {
167 #[cfg(feature = "hotpath-meta")]
168 pub use crate::lib_on::channels::wrapper::asc_wrap::{Receiver, Sender};
169 #[cfg(not(feature = "hotpath-meta"))]
170 pub use async_channel::{Receiver, Sender};
171 }
172}
173
174mod shared;
175pub use shared::{env_flag, Format, IntoF64, Section};
176
177#[doc(hidden)]
178pub mod dev_logging;