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 mem,
30 pin::Pin,
31 sync::Arc,
32};
33
34use {
35 inventory::collect,
36 lombok_macros::*,
37 regex::Regex,
38 serde::{Deserialize, Serialize},
39 tokio::{
40 net::{TcpListener, TcpStream},
41 spawn,
42 sync::watch::{Receiver, Sender, channel},
43 task::JoinHandle,
44 },
45};