A lightweight, production-ready event loop library for Rust that provides efficient non-blocking I/O management without relying on heavyweight async runtimes.
- Runtime-agnostic: No dependency on Tokio or other async runtimes
- Cross-platform: Leverages mio's polling abstraction (epoll, kqueue, IOCP)
- Thread pool integration: Configurable worker threads for handling I/O events
- Compute pool: Dedicated priority-based thread pool for CPU-intensive tasks
- High-level networking: High-level server/client components based on mill-io
- Object pooling: Reduces allocation overhead for frequent operations
- Clean API: Simple registration and handler interface
For the core event loop only:
[dependencies]
mill-io = "2.0.1"For high-level networking (includes mill-io as dependency):
[dependencies]
mill-net = "2.0.1"For detailed architectural documentation, see Architecture Guide.
Supports all major platforms through mio:
- Linux: epoll-based polling
- macOS: kqueue-based polling
- Windows: IOCP-based polling
- FreeBSD/OpenBSD: kqueue-based polling
Minimum supported Rust version: 1.70
Licensed under the Apache License, Version 2.0. See LICENSE for details.
Contributions are welcome! Please read our Contributing Guide for details.