hyperlane/
lib.rs

1//! hyperlane
2//!
3//! A lightweight, high-performance, and cross-platform
4//! Rust HTTP server library built on Tokio. It simplifies
5//! modern web service development by providing built-in
6//! support for middleware, WebSocket, Server-Sent Events (SSE),
7//! and raw TCP communication. With a unified and ergonomic API
8//! across Windows, Linux, and MacOS, it enables developers to
9//! build robust, scalable, and event-driven network
10//! applications with minimal overhead and maximum flexibility.
11
12mod attribute;
13mod config;
14mod context;
15mod error;
16mod handler;
17mod hook;
18mod lifecycle;
19mod panic;
20mod route;
21mod server;
22mod tests;
23
24pub use attribute::*;
25pub use config::*;
26pub use context::*;
27pub use error::*;
28pub use handler::*;
29pub use hook::*;
30pub use panic::*;
31pub use route::*;
32pub use server::*;
33
34pub use http_type::*;
35
36pub(crate) use lifecycle::*;
37
38pub(crate) use std::{
39    any::Any,
40    borrow::Borrow,
41    cmp::Ordering,
42    collections::{HashMap, HashSet},
43    future::Future,
44    net::SocketAddr,
45    panic::Location,
46    pin::Pin,
47    sync::Arc,
48    time::Duration,
49};
50
51pub(crate) use inventory::collect;
52pub(crate) use lombok_macros::*;
53pub(crate) use regex::Regex;
54pub(crate) use serde::{Deserialize, Serialize, de::DeserializeOwned};
55pub(crate) use tokio::{
56    net::{TcpListener, TcpStream},
57    spawn,
58    sync::{
59        RwLockReadGuard, RwLockWriteGuard,
60        watch::{Receiver, Sender, channel},
61    },
62    task::{JoinError, JoinHandle},
63};