| Crates.io | zsync |
| lib.rs | zsync |
| version | 0.1.1 |
| created_at | 2025-02-13 10:32:46.70985+00 |
| updated_at | 2025-02-13 10:36:19.283241+00 |
| description | A Zero Dependency async net runtime thats truly cross-platform, including Windows, Linux, and MacOS. |
| homepage | https://zsync-rs.vercel.app |
| repository | https://github.com/voltageddebunked/zsync |
| max_upload_size | |
| id | 1554052 |
| size | 29,917 |
A zero-dependency, cross-platform async runtime for Rust.
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
}
});
}
Licensed under Apache License, Version 2.0 (LICENSE or http://www.apache.org/licenses/LICENSE-2.0)