moirai_http/lib.rs
1//! Minimal async HTTP/1.1 client and one-shot server transport for the Moirai runtime.
2//!
3//! Runs over Moirai async sockets and [`moirai_tls`] without Tokio. The client
4//! provides Content-Length and chunked response framing, a bounded keep-alive
5//! pool with idle eviction, RFC 9110 redirects, and one deadline across each
6//! logical request. Its optional server boundary uses bounded request bodies,
7//! typed one-shot connection typestates, and the same Moirai socket/deadline
8//! primitives. HTTP/2 and vendor protocols remain outside this crate.
9
10// Response bytes and redirect locations cross a trust boundary. Panicking
11// arithmetic and indexing remain denied for every implementation leaf.
12#![deny(clippy::indexing_slicing, clippy::arithmetic_side_effects)]
13#![forbid(unsafe_code)]
14#![deny(missing_docs)]
15
16mod client;
17pub mod codec;
18pub mod conn;
19mod pool;
20mod redirect;
21pub mod request;
22pub mod server;
23pub mod upgrade;
24pub mod websocket;
25
26pub use client::HttpClient;
27pub use codec::Response;
28pub use conn::Origin;
29pub use request::HttpRequestHead;
30pub use server::{
31 AwaitingRequest, AwaitingResponse, HttpConnection, HttpRequest, HttpResponse, HttpServer,
32 ServerConfig,
33};
34pub use upgrade::{
35 WebSocketConfig, WebSocketUpgrade, accept_websocket, accept_websocket_with_validator,
36};
37pub use websocket::WebSocketStream;