| Crates.io | agnostic-net |
| lib.rs | agnostic-net |
| version | 0.3.0 |
| created_at | 2025-01-27 03:15:34.157329+00 |
| updated_at | 2025-11-04 03:05:08.024947+00 |
| description | Agnostic abstraction layer of `std::net` for any async runtime. |
| homepage | https://github.com/al8n/agnostic |
| repository | https://github.com/al8n/agnostic |
| max_upload_size | |
| id | 1531957 |
| size | 148,353 |
agnostic-net provides runtime-agnostic abstractions for TCP and UDP networking. Write your network code once and run it with tokio, or smol - without any code changes.
std::net but asyncfeatures = ["tokio"]features = ["smol"][dependencies]
agnostic-net = "0.3"
tokio
agnostic-net = { version = "0.3", features = ["tokio"] }
smol
agnostic-net = { version = "0.3", features = ["smol"] }
agnostic-net works on all major platforms:
rustixwindows-sys and socket2std (default): Standard library supporttokio: Tokio runtime supporttokio-io: Tokio I/O trait implementationssmol: Smol runtime supportagnostic-net is under the terms of both the MIT license and the
Apache License (Version 2.0).
See LICENSE-APACHE, LICENSE-MIT for details.
Copyright (c) 2025 Al Liu.