1extern crate self as rust_web_server;
39
40pub mod app;
41#[cfg(feature = "auth")]
42pub mod auth;
43
44#[cfg(feature = "macros")]
45pub use rws_macros::{delete, get, patch, post, put, route, Config, FromRequest, Validate};
46#[cfg(all(feature = "macros", any(feature = "model-sqlite", feature = "model-postgres", feature = "model-mysql")))]
47pub use rws_macros::Model;
48#[cfg(feature = "http2")]
49pub mod async_state;
50#[cfg(feature = "http2")]
51pub(crate) mod async_bridge;
52pub mod session;
53#[cfg(not(target_arch = "wasm32"))]
56pub(crate) mod redis_protocol;
57pub mod sse;
58pub mod compression;
59pub mod cookie;
60pub mod error;
61pub mod extract;
62pub mod ip_filter;
63pub mod macros;
64pub mod blocklist;
65pub mod cache;
66pub mod config_reload;
67pub mod server_config;
68pub mod feature;
69pub mod maintenance;
70pub mod metrics;
71pub mod mcp;
72pub mod request_log;
73pub mod request_id;
74#[cfg(not(target_arch = "wasm32"))]
75pub mod otel;
76#[cfg(feature = "acme")]
77pub mod acme;
78pub mod middleware;
79pub mod rate_limit;
80pub mod router;
81pub mod state;
82pub mod test_client;
83pub mod application;
84pub mod body;
85pub mod client_hint;
86pub mod controller;
87pub mod core;
88pub mod cors;
89pub mod entry_point;
90pub mod ext;
91pub mod header;
92pub mod http;
93pub mod json;
94pub mod language;
95#[cfg(not(target_arch = "wasm32"))]
96pub mod log;
97pub mod mime_type;
98pub mod null;
99pub mod range;
100pub mod request;
101pub mod response;
102pub mod server;
103pub mod symbol;
104#[cfg(not(target_arch = "wasm32"))]
105pub mod thread_pool;
106pub mod url;
107pub mod pagination;
108#[cfg(not(target_arch = "wasm32"))]
109pub mod proxy;
110pub mod rewrite;
111pub mod scheduler;
112#[cfg(not(target_arch = "wasm32"))]
113pub mod tcp_proxy;
114#[cfg(not(target_arch = "wasm32"))]
115pub mod udp_proxy;
116#[cfg(not(target_arch = "wasm32"))]
117pub mod ws_proxy;
118#[cfg(not(target_arch = "wasm32"))]
119pub mod canary;
120#[cfg(not(target_arch = "wasm32"))]
121pub mod circuit_breaker;
122pub mod service_discovery;
127pub mod config_binding;
128pub mod di;
129#[cfg(not(target_arch = "wasm32"))]
130pub mod proxy_config;
131#[cfg(not(target_arch = "wasm32"))]
132pub mod ingress;
133#[cfg(feature = "tera")]
134pub mod template;
135pub mod validate;
136pub mod virtual_host;
137#[cfg(any(feature = "model-sqlite", feature = "model-postgres", feature = "model-mysql"))]
138pub mod model;
139#[cfg(not(target_arch = "wasm32"))]
140pub mod websocket;
141pub mod http_client;
145#[cfg(feature = "crypto")]
146pub mod crypto;
147#[cfg(feature = "csrf")]
148pub mod csrf;
149#[cfg(feature = "sso")]
150pub mod sso;
151#[cfg(all(feature = "mailer", not(target_arch = "wasm32")))]
155pub mod mailer;
156#[cfg(feature = "jobs")]
157pub mod jobs;
158#[cfg(any(feature = "storage-local", feature = "storage-s3", feature = "storage-azure", feature = "secrets"))]
161pub mod storage;
162#[cfg(feature = "openapi")]
163pub mod openapi;
164#[cfg(feature = "webhook")]
165pub mod webhook;
166#[cfg(feature = "secrets")]
167pub mod secrets;
168#[cfg(not(target_arch = "wasm32"))]
171pub mod timeout;
172pub mod prelude;
173
174#[cfg(feature = "http2")]
175#[doc(hidden)]
176pub mod tls;
177
178#[cfg(feature = "http2")]
179#[doc(hidden)]
180pub mod h2_handler;
181
182#[cfg(feature = "http3")]
183#[doc(hidden)]
184pub mod h3_handler;
185
186#[cfg(test)]
193pub mod test_env {
194 use std::sync::{Mutex, OnceLock};
195 static LOCK: OnceLock<Mutex<()>> = OnceLock::new();
196 pub fn lock() -> std::sync::MutexGuard<'static, ()> {
197 LOCK.get_or_init(|| Mutex::new(()))
198 .lock()
199 .unwrap_or_else(|e| e.into_inner())
200 }
201}