2 releases
new 0.1.1 | Feb 13, 2025 |
---|---|
0.1.0 | Feb 13, 2025 |
#1890 in Network programming
219 downloads per month
30KB
817 lines
ZSync
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)