Skip to main content

arcly_http_core/
lib.rs

1//! **arcly-http-core** — the always-compiled foundation of arcly-http.
2//!
3//! Contains the tightly-coupled request core that the optional subsystem
4//! crates (`arcly-http-data`, `-compliance`, `-realtime`, `-messaging`) and
5//! the `arcly-http` facade build on: the zero-lock DI engine, the HTTP
6//! boundary + `RequestContext`, the unified request `pipeline`, identity &
7//! access (`auth`), `resilience`, `observability`, and the self-documenting
8//! OpenAPI surface (`docs`).
9//!
10//! Application code should depend on the `arcly-http` facade and
11//! `use arcly_http::prelude::*;` rather than this crate directly.
12
13#![forbid(unsafe_code)]
14
15pub mod auth;
16pub mod core;
17pub mod docs;
18pub mod http;
19pub mod observability;
20pub mod pipeline;
21pub mod resilience;
22pub mod transport;
23pub mod web;
24
25// Internal path-compat shims: several core modules refer to `crate::session`
26// and `crate::cookie`.
27pub use auth::cookie;
28pub use auth::session;
29
30// Convenience re-exports used across the workspace.
31pub use core::plugins;
32pub use docs::openapi;
33pub use web::{Error, RequestContext};
34
35// Re-exports needed by macro expansions that target core symbols.
36#[doc(hidden)]
37pub use axum as __axum;
38
39/// Build a JSON schema for `T` — backs the macro-emitted OpenAPI schema fns.
40#[doc(hidden)]
41#[inline]
42pub fn __schema_for<T: schemars::JsonSchema>() -> serde_json::Value {
43    serde_json::to_value(schemars::schema_for!(T)).unwrap_or(serde_json::Value::Null)
44}