| Crates.io | rust-high-performance-networking |
| lib.rs | rust-high-performance-networking |
| version | 0.2.2 |
| created_at | 2026-01-17 08:21:08.490093+00 |
| updated_at | 2026-01-17 08:21:08.490093+00 |
| description | High-performance async TCP/UDP/HTTP networking library built on Tokio |
| homepage | |
| repository | https://github.com/xeyronoxz/rust-high-performance-networking |
| max_upload_size | |
| id | 2050133 |
| size | 63,158 |
A high-performance networking library in Rust, providing async TCP/UDP echo servers and HTTP echo server using Tokio and Hyper. Optimized for low-latency I/O operations.
By xeyronoxz
Add this to your Cargo.toml:
[dependencies]
rust-high-performance-networking = "0.2.2"
use rust_high_performance_networking::start_echo_server;
use tokio::sync::broadcast;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
let (shutdown_tx, shutdown_rx) = broadcast::channel(1);
start_echo_server("127.0.0.1:8080", 100, shutdown_rx).await?;
// To shutdown: shutdown_tx.send(()).unwrap();
Ok(())
}
use rust_high_performance_networking::start_udp_echo_server;
use tokio::sync::broadcast;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
let (shutdown_tx, shutdown_rx) = broadcast::channel(1);
start_udp_echo_server("127.0.0.1:8081", shutdown_rx).await?;
Ok(())
}
use rust_high_performance_networking::start_http_echo_server;
use tokio::sync::broadcast;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
let (shutdown_tx, shutdown_rx) = broadcast::channel(1);
start_http_echo_server("127.0.0.1:8082", 100, shutdown_rx).await?;
Ok(())
}
Run cargo doc --open to view detailed API docs.
Run benchmarks with:
cargo bench
Run tests with:
cargo test
MIT License - see LICENSE file.
Contributions welcome! Please submit issues and pull requests.