1#[cfg(test)]
14extern crate self as rust_web_server;
15
16#[allow(unused_imports)]
19#[doc(hidden)]
20pub use rws_base::{core, dns, ext, http, mime_type, null, symbol, url};
21#[allow(unused_imports)]
23#[doc(hidden)]
24pub use rws_http::{body, client_hint, compression, cors, entry_point, error, extract, header, json, range, request, response, server_config, virtual_host};
25
26pub mod app;
27#[cfg(feature = "auth")]
28pub mod auth;
29#[cfg(feature = "http2")]
30pub mod async_state;
31#[cfg(feature = "http2")]
32#[doc(hidden)]
33pub mod async_bridge;
34pub mod session;
35#[cfg(not(target_arch = "wasm32"))]
38#[doc(hidden)]
39pub mod redis_protocol;
40pub mod sse;
41pub mod cookie;
42#[cfg(all(unix, any(feature = "http1", feature = "http2")))]
43pub mod systemd;
44pub mod ip_filter;
45pub mod blocklist;
46pub mod cache;
47pub mod early_hints;
48pub mod disk_guard;
49pub mod authz;
50pub mod config_reload;
51#[cfg(not(target_arch = "wasm32"))]
52pub mod config_watch;
53#[cfg(any(feature = "auth-asymmetric", feature = "sso"))]
55pub mod rsa_key;
56pub mod feature;
57pub mod maintenance;
58pub mod metrics;
59pub mod mcp;
60pub mod request_log;
61pub mod request_id;
62#[cfg(not(target_arch = "wasm32"))]
63pub mod otel;
64pub mod middleware;
65pub mod rate_limit;
66pub mod router;
67pub mod schema;
68pub mod state;
69pub mod test_client;
70pub mod application;
71pub mod controller;
72pub mod language;
73#[cfg(not(target_arch = "wasm32"))]
74pub mod log;
75pub mod server;
76#[cfg(not(target_arch = "wasm32"))]
77pub mod thread_pool;
78pub mod pagination;
79pub mod rewrite;
80pub mod scheduler;
81#[cfg(not(target_arch = "wasm32"))]
82pub mod circuit_breaker;
83pub mod service_discovery;
88pub mod config_binding;
89pub mod di;
90pub mod validate;
91#[cfg(any(feature = "model-sqlite", feature = "model-postgres", feature = "model-mysql"))]
92pub mod model;
93#[cfg(not(target_arch = "wasm32"))]
94pub mod websocket;
95pub mod http_client;
99#[cfg(feature = "crypto")]
100pub mod crypto;
101#[cfg(feature = "csrf")]
102pub mod csrf;
103#[cfg(feature = "sso")]
104pub mod sso;
105#[cfg(feature = "openapi")]
106pub mod openapi;
107#[cfg(feature = "secrets")]
108pub mod secrets;
109#[cfg(not(target_arch = "wasm32"))]
112pub mod timeout;
113#[cfg(feature = "http2")]
114#[doc(hidden)]
115pub mod tls;
116#[cfg(feature = "http2")]
117#[doc(hidden)]
118pub mod h2_server;
119#[cfg(feature = "http3")]
120#[doc(hidden)]
121pub mod h3_handler;
122
123#[cfg(any(feature = "storage-local", feature = "storage-s3", feature = "storage-azure", feature = "storage-gcs", feature = "secrets"))]
126pub mod storage;
127
128#[cfg(all(any(feature = "http-client", feature = "http2"), not(target_arch = "wasm32")))]
132pub fn crypto_provider() -> rustls::crypto::CryptoProvider {
133 #[cfg(feature = "fips")]
134 return rustls::crypto::default_fips_provider();
135 #[cfg(not(feature = "fips"))]
136 rustls::crypto::aws_lc_rs::default_provider()
137}
138
139pub const FIPS: bool = cfg!(feature = "fips");
141
142#[cfg(all(any(feature = "http-client", feature = "http2"), not(target_arch = "wasm32")))]
149#[doc(hidden)]
150pub fn tls_client_builder() -> rustls::ConfigBuilder<rustls::ClientConfig, rustls::WantsVerifier> {
151 rustls::ClientConfig::builder_with_provider(std::sync::Arc::new(crate::crypto_provider()))
152 .with_safe_default_protocol_versions()
153 .expect("aws-lc-rs supports rustls's default protocol versions")
154}
155
156
157#[cfg(test)]
158pub(crate) mod test_env;
159
160#[cfg(feature = "macros")]
164#[doc(hidden)]
165pub use rws_macros::{Config, FromRequest, JsonSchema, Validate};