Rust Systems Project

Rust

High-performance async networking system built with Rust and Tokio

Tech Stack

Rust 1.80
Tokio
PostgreSQL
Cargo
async/await

Features

Async networking with Tokio
Zero-cost abstractions
Memory-safe concurrency
High throughput I/O
Type-safe system programming
PostgreSQL integration

Code Sample

main.rs
use tokio::net::TcpListener;
use tokio::io::{AsyncReadExt, AsyncWriteExt};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let listener = TcpListener::bind("0.0.0.0:8080").await?;
    println!("Server running on port 8080");

    loop {
        let (mut socket, addr) = listener.accept().await?;
        tokio::spawn(async move {
            let mut buf = [0u8; 1024];
            let n = socket.read(&mut buf).await.unwrap();
            socket.write_all(&buf[..n]).await.unwrap();
        });
    }
}
View Source Docker Hub Live Demo