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 hook;
17mod lifecycle;
18mod panic;
19mod route;
20mod server;
21mod tests;
22
23pub use attribute::*;
24pub use config::*;
25pub use context::*;
26pub use error::*;
27pub use hook::*;
28pub use panic::*;
29pub use route::*;
30pub use server::*;
31
32pub use http_type::*;
33pub use inventory::{collect as server_collect, submit as server_submit};
34
35pub(crate) use lifecycle::*;
36
37pub(crate) use std::{
38    any::Any,
39    borrow::Borrow,
40    cmp::Ordering,
41    collections::{HashMap, HashSet},
42    future::Future,
43    net::SocketAddr,
44    panic::Location,
45    pin::Pin,
46    sync::Arc,
47    time::Duration,
48};
49
50pub(crate) use lombok_macros::*;
51pub(crate) use regex::Regex;
52pub(crate) use serde::{Deserialize, Serialize, de::DeserializeOwned};
53pub(crate) use tokio::{
54    net::{TcpListener, TcpStream},
55    spawn,
56    sync::{
57        RwLockReadGuard, RwLockWriteGuard,
58        watch::{Receiver, Sender, channel},
59    },
60    task::{JoinError, JoinHandle},
61};