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
<div align="center">

<img src="https://devhub.vip/pages/docs/img/hyperlane.png" alt="hyperlane-core logo" height="120">

# hyperlane-core

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

[![Crates.io Version](https://flat.badgen.net/crates/v/hyperlane-core)](https://crates.io/crates/hyperlane-core)
[![Docs.rs](https://img.shields.io/docsrs/hyperlane-core?style=flat-square)](https://docs.rs/hyperlane-core)
[![CI Status](https://img.shields.io/github/actions/workflow/status/hyperlane-dev/hyperlane/rust.yml?branch=master&style=flat-square&label=CI)](https://github.com/hyperlane-dev/hyperlane/actions/workflows/rust.yml)
[![Rust 2024](https://img.shields.io/badge/edition-2024-orange.svg?style=flat-square)](https://www.rust-lang.org)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](../LICENSE)

[Workspace Overview](../README.md) ยท [API Docs](https://docs.rs/hyperlane-core/latest/)

</div>

---

## Overview

`hyperlane-core` is the Tokio-powered multi-protocol server runtime at the center of the [`hyperlane`](../README.md) 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

```sh
cargo add hyperlane-core
```

## Usage

```rust
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

```sh
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](../LICENSE) file for details.

## Contact

For inquiries, please contact the author at [root@devhub.vip](mailto:root@devhub.vip).