finds.dev← search

// the find

mitchellh/libxev

★ 3,527 · Zig · MIT · updated Jun 2026

libxev is a cross-platform, high-performance event loop that provides abstractions for non-blocking IO, timers, events, and more and works on Linux (io_uring or epoll), macOS (kqueue), and Wasm + WASI. Available as both a Zig and C API.

libxev is a Zig event loop library that wraps io_uring, epoll, kqueue, and WASI poll behind a unified proactor-style API, plus a C-compatible header for use from any language. It's the event loop powering Ghostty, so it has real production validation. If you want an io_uring-first abstraction without pulling in libuv, this is the most serious option in the Zig ecosystem.

Zero runtime allocations is a real design constraint, not a marketing claim — completions are caller-allocated, so there's no hidden heap activity in the hot path. The proactor pattern is the right model for io_uring (completion-based, not readiness-based), and it mirrors that model consistently across all backends rather than faking it. The C API is first-class, not an afterthought — the header is clean and the examples show symmetric Zig/C usage. Zig tree-shaking means unused watchers (UDP, process, etc.) drop out of the binary entirely without any conditional compilation.

Windows is still not done — it's in the roadmap and there's a `src/backend/iocp.zig` stub, but if you need Windows today this isn't your library. The `std.Io` integration story is a mess by the author's own admission: libxev predates the new `std.Io` interface and doesn't implement it, which will matter more as the Zig stdlib stabilizes around that abstraction. Documentation is man pages and code comments — there's a half-built Next.js website in the repo that appears to be abandoned. Benchmark numbers are conspicuously absent ('I won't post specific results until I have a better environment'), which makes it hard to evaluate the performance claims against libuv or tokio concretely.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →