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(all(feature = "hotpath-alloc-meta", not(feature = "hotpath-meta")))]
18compile_error!("the `hotpath-alloc-meta` feature requires the `hotpath-meta` feature");
19
20#[cfg(all(feature = "hotpath-cpu-meta", not(feature = "hotpath-meta")))]
21compile_error!("the `hotpath-cpu-meta` feature requires the `hotpath-meta` feature");
22
23#[cfg(all(feature = "hotpath-prometheus-meta", not(feature = "hotpath-meta")))]
24compile_error!("the `hotpath-prometheus-meta` feature requires the `hotpath-meta` feature");
25
26#[cfg(all(feature = "hotpath-cloud-meta", not(feature = "hotpath-meta")))]
27compile_error!("the `hotpath-cloud-meta` feature requires the `hotpath-meta` feature");
28
29#[cfg(feature = "hotpath-meta")]
30#[doc(inline)]
31pub use lib_on::*;
32#[cfg(feature = "hotpath-meta")]
33mod lib_on;
34
35#[cfg(all(feature = "hotpath-meta", feature = "tokio"))]
36pub use lib_on::tokio_runtime;
37
38#[cfg(feature = "json")]
39pub(crate) mod output;
40#[cfg(feature = "json")]
41pub use output::{
42 ceil_char_boundary, floor_char_boundary, format_bytes, format_count, format_duration,
43 format_percentile_header, format_percentile_key, format_rate, parse_bytes, parse_count,
44 parse_duration, shorten_function_name, ProfilingMode, MAX_LOG_LEN,
45};
46#[cfg(feature = "hotpath-meta")]
47pub use output_on::format_debug_truncated;
48
49#[cfg(feature = "hotpath-meta")]
50pub(crate) mod output_on;
51
52#[cfg(feature = "hotpath-meta")]
53#[doc(hidden)]
54pub mod table;
55
56#[cfg(feature = "hotpath-meta")]
57pub(crate) mod auth;
58
59#[cfg(feature = "hotpath-meta")]
60pub(crate) mod metrics_server;
61
62#[cfg(feature = "hotpath-prometheus-meta")]
63pub(crate) mod prometheus_server;
64
65#[cfg(feature = "hotpath-mcp-meta")]
66pub(crate) mod mcp_server;
67
68#[allow(dead_code)]
69#[cfg(feature = "json")]
70pub mod json;
71#[cfg(feature = "json")]
72pub use json::Route;
73
74#[cfg(feature = "hotpath-meta")]
75#[doc(hidden)]
76pub mod instant;
77#[cfg(feature = "hotpath-meta")]
78pub(crate) mod tid;
79
80#[cfg(not(feature = "hotpath-meta"))]
81#[doc(inline)]
82pub use lib_off::*;
83#[cfg(not(feature = "hotpath-meta"))]
84mod lib_off;
85
86pub mod wrap {
90 pub mod std {
91 pub mod sync {
92 #[cfg(feature = "hotpath-meta")]
93 pub use crate::lib_on::{
94 mutexes::wrapper::std::{Mutex, MutexGuard},
95 rw_locks::wrapper::std::{RwLock, RwLockReadGuard, RwLockWriteGuard},
96 };
97 #[cfg(not(feature = "hotpath-meta"))]
98 pub use std::sync::{Mutex, MutexGuard, RwLock, RwLockReadGuard, RwLockWriteGuard};
99
100 pub mod mpsc {
106 #[cfg(feature = "hotpath-meta")]
107 pub use crate::lib_on::channels::wrapper::std_wrap::{
108 Receiver, Sender, SyncSender,
109 };
110 #[cfg(not(feature = "hotpath-meta"))]
111 pub use std::sync::mpsc::{Receiver, Sender, SyncSender};
112 }
113 }
114 }
115
116 #[cfg(feature = "tokio")]
122 pub mod tokio {
123 pub mod sync {
124 pub mod mpsc {
125 #[cfg(feature = "hotpath-meta")]
126 pub use crate::lib_on::channels::wrapper::tokio_wrap::{
127 Receiver, Sender, UnboundedReceiver, UnboundedSender, WeakSender,
128 WeakUnboundedSender,
129 };
130 #[cfg(not(feature = "hotpath-meta"))]
131 pub use tokio::sync::mpsc::{
132 Receiver, Sender, UnboundedReceiver, UnboundedSender, WeakSender,
133 WeakUnboundedSender,
134 };
135 }
136
137 pub mod oneshot {
143 #[cfg(feature = "hotpath-meta")]
144 pub use crate::lib_on::channels::wrapper::tokio_oneshot_wrap::{Receiver, Sender};
145 #[cfg(not(feature = "hotpath-meta"))]
146 pub use tokio::sync::oneshot::{Receiver, Sender};
147 }
148 }
149 }
150
151 #[cfg(feature = "crossbeam")]
156 pub mod crossbeam {
157 #[cfg(feature = "hotpath-meta")]
158 pub use crate::lib_on::channels::wrapper::crossbeam_wrap::{Receiver, Sender};
159 #[cfg(not(feature = "hotpath-meta"))]
160 pub use crossbeam_channel::{Receiver, Sender};
161 }
162
163 #[cfg(feature = "flume")]
168 pub mod flume {
169 #[cfg(feature = "hotpath-meta")]
170 pub use crate::lib_on::channels::wrapper::flume_wrap::{Receiver, Sender};
171 #[cfg(not(feature = "hotpath-meta"))]
172 pub use flume::{Receiver, Sender};
173 }
174
175 #[cfg(feature = "async-channel")]
180 pub mod async_channel {
181 #[cfg(feature = "hotpath-meta")]
182 pub use crate::lib_on::channels::wrapper::asc_wrap::{Receiver, Sender};
183 #[cfg(not(feature = "hotpath-meta"))]
184 pub use async_channel::{Receiver, Sender};
185 }
186
187 #[cfg(feature = "futures")]
192 pub mod futures_channel {
193 pub mod mpsc {
194 #[cfg(feature = "hotpath-meta")]
195 pub use crate::lib_on::channels::wrapper::ftc_wrap::{
196 Receiver, Sender, TrySendError, UnboundedReceiver, UnboundedSender,
197 };
198 #[cfg(not(feature = "hotpath-meta"))]
199 pub use futures_channel::mpsc::{
200 Receiver, Sender, TrySendError, UnboundedReceiver, UnboundedSender,
201 };
202 }
203
204 pub mod oneshot {
205 #[cfg(feature = "hotpath-meta")]
206 pub use crate::lib_on::channels::wrapper::ftc_oneshot_wrap::{Receiver, Sender};
207 #[cfg(not(feature = "hotpath-meta"))]
208 pub use futures_channel::oneshot::{Receiver, Sender};
209 }
210 }
211}
212
213mod shared;
214pub use shared::{env_flag, Format, IntoF64, Section};
215
216#[doc(hidden)]
217pub mod dev_logging;