Lio - Platform-Independent Async I/O Library
Lio is a high-performance, platform-independent async I/O library that uses the most efficient IO for each platform.
Features
- Zero-copy operations where possible.
- Automatic fallback to blocking operations when async isn't supported.
- Manual control with high level async API.
Note: This is a quite low-level library. This library creates os resources (fd's) which it doesn't cleanup automatically.
Platform support
| Platform | I/O Mechanism | Status |
|---|---|---|
| Linux | io_uring | Yes |
| Windows | IOCP | Not supported (planned) |
| macOS | kqueue | Yes |
| Other Unix | poll/epoll/event ports | Yes |
Quick Start
#
use RawFd;
async
Note: Only one of these API's can be used for one operation.
Safety and Threading
- The library handles thread management for background I/O processing
- Operations can be safely used across different threads
Error Handling
All operations return [std::io::Result] or [BufResult] for operations
that return buffers. Errors are automatically converted from platform-specific
error codes to Rust's standard I/O error types.