Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
Sichere ProgrammierungRefreshed repository pull requests page generally available(22.09.2026 um 03:25 Uhr)
Sichere ProgrammierungThe Joy of Learning the Basics Again(22.09.2026 um 03:28 Uhr)
Sichere ProgrammierungZero-Code OpenTelemetry Tracing for Dagster(22.09.2026 um 03:39 Uhr)
Linux Tipps & Hardening`prime-all`(22.09.2026 um 02:28 Uhr)
IT Security Toolsopensoho v0.15.2(22.09.2026 um 03:33 Uhr)
IT Security NachrichtenUS Proposes AI Incident Alert System in Talks With China, Bessent Says(22.09.2026 um 04:01 Uhr)
Sichere ProgrammierungRefreshed repository pull requests page generally available(22.09.2026 um 03:25 Uhr)
Sichere ProgrammierungThe Joy of Learning the Basics Again(22.09.2026 um 03:28 Uhr)
Sichere ProgrammierungZero-Code OpenTelemetry Tracing for Dagster(22.09.2026 um 03:39 Uhr)
Linux Tipps & Hardening`prime-all`(22.09.2026 um 02:28 Uhr)
IT Security Toolsopensoho v0.15.2(22.09.2026 um 03:33 Uhr)
IT Security NachrichtenUS Proposes AI Incident Alert System in Talks With China, Bessent Says(22.09.2026 um 04:01 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

⚡The Ultimate Choice for Building Modern Web Services: A Lightweight Rust HTTP Framework

In today’s digital era, building high-performance and reliable web services is a goal pursued by every developer. Today, we are proud to introduce Hyperlane, a lightweight and high-performance Rust HTTP server library designed to simplify y…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

In today’s digital era, building high-performance and reliable web services is a goal pursued by every developer. Today, we are proud to introduce Hyperlane, a lightweight and high-performance Rust HTTP server library designed to simplify your web service development.






Project Overview



Hyperlane is built entirely with pure Rust and the standard library, offering true cross-platform compatibility across Windows, Linux, and macOS—with consistent API behavior on all platforms. It leverages the asynchronous Tokio runtime to enable seamless network communication without platform-specific dependencies.



Key Features:




  • Supports HTTP request parsing, response construction, and TCP communication.

  • Built-in support for request/response middleware, WebSocket, and Server-Sent Events (SSE) for efficient and flexible real-time communication.

  • Simple and intuitive API design that allows developers to quickly build modern web services.






Getting Started



To get started with Hyperlane, add it to your project using the following command:




cargo add hyperlane






We also provide a quick start project, hyperlane-quick-start, to help you set up and run your first Hyperlane application quickly.



Clone the project:




git clone https://github.com/eastspire/hyperlane-quick-start.git






Navigate to the project directory:




cd hyperlane-quick-start






Run the project:




cargo run






You can also choose to run it in the background, stop, or restart the service:




# Run in background
cargo run -d

# Stop the service
cargo run stop

# Restart the service
cargo run restart

# Restart in background
cargo run restart -d









Example Usage



Below is a simple Hyperlane application demonstrating how to set up middleware, routes, and WebSocket support:




use hyperlane::*;

async fn request_middleware(ctx: Context) {
let socket_addr: String = ctx.get_socket_addr_or_default_string().await;
ctx.set_response_header(SERVER, HYPERLANE)
.await
.set_response_header(CONNECTION, CONNECTION_KEEP_ALIVE)
.await
.set_response_header(CONTENT_TYPE, TEXT_PLAIN)
.await
.set_response_header("SocketAddr", socket_addr)
.await;
}

async fn response_middleware(ctx: Context) {
let _ = ctx.send().await;
}

async fn root_route(ctx: Context) {
ctx.set_response_status_code(200)
.await
.set_response_body("Hello hyperlane => /")
.await;
}

async fn websocket_route(ctx: Context) {
let request_body: Vec<u8> = ctx.get_request_body().await;
let _ = ctx.send_response_body(request_body).await;
}

fn error_handle(error: String) {
eprintln!("{}", error);
let _ = std::io::Write::flush(&mut std::io::stderr());
}

#[tokio::main]
async fn main() {
let server: Server = Server::new();
server.host("0.0.0.0").await;
server.port(60000).await;
server.enable_nodelay().await;
server.disable_linger().await;
server.http_line_buffer_size(4096).await;
server.websocket_buffer_size(4096).await;
server.error_handle(error_handle).await;
server.request_middleware(request_middleware).await;
server.response_middleware(response_middleware).await;
server.route("/", root_route).await;
server.route("/websocket", websocket_route).await;
server
.route("/test/:text", move |ctx: Context| async move {
let param: RouteParams = ctx.get_route_params().await;
panic!("Test panic {:?}", param);
})
.await;
server.run().await.unwrap();
}









Performance Benchmark



We benchmarked Hyperlane to demonstrate its excellent performance using the wrk and ab tools. Below are the results:






wrk Benchmark



Command:




wrk -c360 -d60s http://127.0.0.1:60000/






Results:
















































Rank Framework QPS
1 Tokio 340,130.92
2 Hyperlane 324,323.71
3 Rocket 298,945.31
4 Rust stdlib 291,218.96
5 Gin 242,570.16
6 Go stdlib 234,178.93
7 Node stdlib 139,412.13





ab Benchmark



Command:




ab -n 1000000 -c 1000 -r -k http://127.0.0.1:60000/






Results:
















































Rank Framework QPS
1 Tokio 308,596.26
2 Hyperlane 307,568.90
3 Rocket 267,931.52
4 Rust stdlib 260,514.56
5 Go stdlib 226,550.34
6 Gin 224,296.16
7 Node stdlib 85,357.18





License & Contribution



Hyperlane is released under the MIT license. For more information, please refer to the license file.

We welcome contributions from the community! You can get involved by submitting issues or opening pull requests.



If you have any questions or need further assistance, feel free to contact the author: [email protected].



Choose Hyperlane — choose the future of high-performance and elegant web service development. Start your development journey now and experience the speed and simplicity that Hyperlane brings!

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten ⚡The Ultimate Choice for Building Modern Web Services: A Lightweight Rust HTTP Framework

Thematisch verwandte Begriffe: Ultimate, Choice, Building, Modern · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-49449 | Joplin is an open source note-taking and to-do application that organise…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick