#run-time #cross-platform #async #zero #macos #net #linux-macos

zsync

A Zero Dependency async net runtime thats truly cross-platform, including Windows, Linux, and MacOS

2 releases

new 0.1.1 Feb 13, 2025
0.1.0 Feb 13, 2025

#1890 in Network programming

Download history 219/week @ 2025-02-11

219 downloads per month

Apache-2.0

30KB
817 lines

ZSync

Rust License Edition Tests

A zero-dependency, cross-platform async runtime for Rust.

Features

  • Zero external dependencies
  • Cross-platform (Linux/macOS/Windows)
  • Native async I/O (epoll/kqueue/IOCP)
  • Efficient task scheduling
  • Full TCP support
  • Thread-safe executor

Usage

use zsync::{Runtime, TcpListener};

fn main() {
    let runtime = Runtime::new().unwrap();
    
    runtime.block_on(async {
        let listener = TcpListener::bind("127.0.0.1:8080").await.unwrap();
        
        while let Ok((mut socket, _)) = listener.accept().await {
            // Handle connection
        }
    });
}

Requirements

  • Rust 1.74 or higher
  • Rust 2021 edition

License

Licensed under Apache License, Version 2.0 (LICENSE or http://www.apache.org/licenses/LICENSE-2.0)

No runtime deps