hyperlane-core 23.4.0

A lightweight, high-performance, and cross-platform Rust HTTP server library built on Tokio. It simplifies modern web service development by providing built-in support for middleware, WebSocket, Server-Sent Events (SSE), and raw TCP communication. With a unified and ergonomic API across Windows, Linux, and MacOS, it enables developers to build robust, scalable, and event-driven network applications with minimal overhead and maximum flexibility.
Documentation

hyperlane-core

Multi-Protocol Async HTTP/1.x, HTTP/2 & HTTP/3 Server Engine

Crates.io Version Docs.rs CI Status Rust 2024 License: MIT

Workspace Overview · API Docs


Overview

hyperlane-core is the Tokio-powered multi-protocol server runtime at the center of the hyperlane workspace. It drives HTTP/1.0, HTTP/1.1, HTTP/2 (h2c/h2), HTTP/3 (QUIC), WebSocket, and raw TCP connections with deterministic lifecycle hooks and optional Linux io_uring transport.

Installation

cargo add hyperlane-core

Usage

use hyperlane_core::{Server, ServerConfig, ServerError};

async fn start_server() -> Result<(), Box<ServerError>> {
    let mut config: ServerConfig = ServerConfig::default();
    config.set_address("127.0.0.1:3000");

    let mut server: Server = Server::default();
    server.server_config(config);

    let control = server.run().await?;
    control.wait().await;
    Ok(())
}

Verification

cargo run -p hyperlane-cli -- fmt --check
cargo clippy -p hyperlane-core --all-features --all-targets -- -D warnings
cargo test -p hyperlane-core --all-features

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For inquiries, please contact the author at root@devhub.vip.