libxev is a cross-platform, high-performance event loop that provides abstractions for non-blocking IO, timers, events, and more.
The library addresses the need for a generalized event loop comparable to existing solutions but designed around io_uring patterns and principles. It unifies event handling across multiple platforms by implementing a proactor API, where work is submitted to the event loop and callers are notified of completion rather than readiness. The tool supports Linux via io_uring or epoll, macOS via kqueue, and WebAssembly through both WASI and freestanding environments, with Windows support planned. It offers both high-level platform-agnostic APIs and low-level escape hatches for maximum performance, covering timers, TCP, UDP, file operations, and process management.
Developers should choose this tool if they need a lightweight event loop that avoids runtime allocations and works across diverse platforms including embedded environments and WebAssembly targets. The library suits projects requiring predictable performance characteristics and the ability to compile to multiple backends without major code changes. It is particularly valuable for teams building in Zig or needing C API compatibility, as it exports a C-compatible interface usable from any language that can call C functions. The high-level API provides sensible defaults for most use cases, while the low-level API allows fine-grained control when needed. The project is in daily use by large-scale applications and has demonstrated stability in production environments.
The project maintains active engagement with real-world usage patterns, as evidenced by its integration into established production systems. Development prioritizes practical robustness over theoretical completeness, with the maintainers acknowledging that less-used library corners may have gaps while core functionality remains battle-tested. The codebase reflects careful attention to performance characteristics and resource efficiency, particularly around the zero-allocation design constraint. The project's scope remains focused on event loop functionality rather than expanding into adjacent domains, keeping the surface area manageable for both maintenance and users.