hyperlane_core/lib.rs
1//! hyperlane-core
2//!
3//! A lightweight, high-performance, and cross-platform Rust
4//! HTTP server library built on Tokio. It simplifies modern
5//! web service development by providing built-in support
6//! for middleware, WebSocket, Server-Sent Events (SSE),
7//! and raw TCP communication. With a unified and ergonomic
8//! API across Windows, Linux, and MacOS, it enables developers
9//! to build robust, scalable, and event-driven network
10//! applications with minimal overhead and maximum flexibility.
11
12mod config;
13mod context;
14mod error;
15mod hook;
16mod route;
17mod server;
18
19pub use {config::*, context::*, error::*, hook::*, route::*, server::*};
20
21pub use {http_type::*, inventory};
22
23use std::{
24 cmp::Ordering,
25 collections::HashSet,
26 future::Future,
27 hash::{Hash, Hasher},
28 io::{self, Write, stderr, stdout},
29 pin::Pin,
30 sync::Arc,
31};
32
33use {
34 inventory::collect,
35 lombok_macros::*,
36 regex::Regex,
37 serde::{Deserialize, Serialize},
38 tokio::{
39 net::{TcpListener, TcpStream},
40 spawn,
41 sync::watch::{Receiver, Sender, channel},
42 task::JoinHandle,
43 },
44};