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(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, 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 auth;
54
55#[cfg(feature = "hotpath-meta")]
56pub(crate) mod metrics_server;
57
58#[cfg(feature = "hotpath-prometheus-meta")]
59pub(crate) mod prometheus_server;
60
61#[cfg(feature = "hotpath-mcp-meta")]
62pub(crate) mod mcp_server;
63
64#[allow(dead_code)]
65#[cfg(any(feature = "hotpath-meta", feature = "tui"))]
66pub mod json;
67#[cfg(any(feature = "hotpath-meta", feature = "tui"))]
68pub use json::Route;
69
70#[cfg(feature = "hotpath-meta")]
71#[doc(hidden)]
72pub mod instant;
73#[cfg(feature = "hotpath-meta")]
74pub(crate) mod tid;
75
76#[cfg(not(feature = "hotpath-meta"))]
77#[doc(inline)]
78pub use lib_off::*;
79#[cfg(not(feature = "hotpath-meta"))]
80mod lib_off;
81
82pub mod wrap {
86 pub mod std {
87 pub mod sync {
88 #[cfg(feature = "hotpath-meta")]
89 pub use crate::lib_on::{
90 mutexes::wrapper::std::{Mutex, MutexGuard},
91 rw_locks::wrapper::std::{RwLock, RwLockReadGuard, RwLockWriteGuard},
92 };
93 #[cfg(not(feature = "hotpath-meta"))]
94 pub use std::sync::{Mutex, MutexGuard, RwLock, RwLockReadGuard, RwLockWriteGuard};
95
96 pub mod mpsc {
102 #[cfg(feature = "hotpath-meta")]
103 pub use crate::lib_on::channels::wrapper::std_wrap::{
104 Receiver, Sender, SyncSender,
105 };
106 #[cfg(not(feature = "hotpath-meta"))]
107 pub use std::sync::mpsc::{Receiver, Sender, SyncSender};
108 }
109 }
110 }
111
112 #[cfg(feature = "tokio")]
118 pub mod tokio {
119 pub mod sync {
120 pub mod mpsc {
121 #[cfg(feature = "hotpath-meta")]
122 pub use crate::lib_on::channels::wrapper::tokio_wrap::{
123 Receiver, Sender, UnboundedReceiver, UnboundedSender, WeakSender,
124 WeakUnboundedSender,
125 };
126 #[cfg(not(feature = "hotpath-meta"))]
127 pub use tokio::sync::mpsc::{
128 Receiver, Sender, UnboundedReceiver, UnboundedSender, WeakSender,
129 WeakUnboundedSender,
130 };
131 }
132 }
133 }
134
135 #[cfg(feature = "crossbeam")]
140 pub mod crossbeam {
141 #[cfg(feature = "hotpath-meta")]
142 pub use crate::lib_on::channels::wrapper::crossbeam_wrap::{Receiver, Sender};
143 #[cfg(not(feature = "hotpath-meta"))]
144 pub use crossbeam_channel::{Receiver, Sender};
145 }
146
147 #[cfg(feature = "flume")]
152 pub mod flume {
153 #[cfg(feature = "hotpath-meta")]
154 pub use crate::lib_on::channels::wrapper::flume_wrap::{Receiver, Sender};
155 #[cfg(not(feature = "hotpath-meta"))]
156 pub use flume::{Receiver, Sender};
157 }
158
159 #[cfg(feature = "async-channel")]
164 pub mod async_channel {
165 #[cfg(feature = "hotpath-meta")]
166 pub use crate::lib_on::channels::wrapper::asc_wrap::{Receiver, Sender};
167 #[cfg(not(feature = "hotpath-meta"))]
168 pub use async_channel::{Receiver, Sender};
169 }
170}
171
172mod shared;
173pub use shared::{env_flag, Format, IntoF64, Section};
174
175#[doc(hidden)]
176pub mod dev_logging;