Skip to main content

hyperlane_core/
lib.rs

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