| Crates.io | agnostic-io |
| lib.rs | agnostic-io |
| version | 0.2.0 |
| created_at | 2025-01-27 03:15:11.203831+00 |
| updated_at | 2025-11-04 03:04:56.351269+00 |
| description | `agnostic-io` defines I/O traits in agnostic style for any async runtime. |
| homepage | https://github.com/al8n/agnostic |
| repository | https://github.com/al8n/agnostic |
| max_upload_size | |
| id | 1531956 |
| size | 18,838 |
agnostic-io provides runtime-agnostic I/O traits following the Sans-I/O design philosophy. It defines standardized async I/O interfaces that work across tokio, smol, and other runtimes without coupling your protocol implementations to specific I/O primitives.
Sans-I/O (French for "without I/O") is a design pattern that separates protocol logic from I/O implementation. Instead of tightly coupling your code to specific I/O libraries, you:
agnostic-io provides)This approach makes your code:
no_std Compatible: Can be used in embedded environments[dependencies]
agnostic-io = "0.2"
# Standard library support (default)
agnostic-io = { version = "0.1", features = ["std"] }
# Allocation support without std
agnostic-io = { version = "0.1", default-features = false, features = ["alloc"] }
# Tokio I/O trait compatibility
agnostic-io = { version = "0.1", features = ["tokio"] }
# no_std without allocations
agnostic-io = { version = "0.1", default-features = false }
When using the tokio feature, agnostic-io provides compatibility with tokio::io traits:
[dependencies]
agnostic-io = { version = "0.1", features = ["tokio"] }
std (default): Standard library supportalloc: Allocation support without stdtokio: Compatibility with tokio::io traitsagnostic-io 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.