mitchellh/libxev
View on GitHub ↗ ★ 3,601 Zig
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.
10 mentions on Hacker News by 9 people: 2 stories, 8 comments · first 2023-01-26 · latest 2025-11-28
20082026
-
…It’s a Zig based event loop (similar to libuv) inspired by Tigerbeetle’s implementation. [1] https://github.com/mitchellh/libxev
comment by ayuhito · 2025-11-28 · in A programmer-friendly I/O abstraction over io_uring and kqueue (2022) -
Ghostty uses Mach ports on OS X in addition to kqueue. Source is here: https://github.com/mitchellh/libxev/blob/main/src/backend/kq...
comment by loeg · 2025-10-12 · in I/O Multiplexing (select vs. poll vs. epoll/kqueue) -
…What is ghostty doing there that doesn't work on OpenBSD? E.g., here it is kqueue-aware on FreeBSD: https://github.com/mitchellh/libxev/blob/34fa50878aec6e5fa8f... Might not be that different to add OpenBSD. Someone would begin here:…
comment by loeg · 2025-10-04 · in Zig builds are getting faster -
…best performance out of a resource-constrained environment, the tradeoffs start to make sense. [0]: https://github.com/mitchellh/libxev
comment by samatman · 2024-06-15 · in Leveraging Zig's Allocators -
…was not expecting "Wasm + WASI" support at all. that's very cool. implementation is wasi_poll.zig ( https://github.com/mitchellh/libxev/blob/main/src/backend/wa... ). not to be unkind, but this makes me wonder very much if WASI is already…
comment by jauntywundrkind · 2024-04-17 · in libxev: A cross-platform, high-performance event loop -
▲ 289
libxev: A cross-platform, high-performance event loopstory by tosh · 2024-04-17 · 32 comments
-
For zig take a look at https://github.com/mitchellh/libxev and https://github.com/rsepassi/zigcoro
comment by Cloudef · 2024-03-12 · in Show HN: Async tasks in 350 lines of C -
…in a pure Zig implementation of these primitives by Mitchell in his "libxev" event loop library: https://github.com/mitchellh/libxev
comment by dns_snek · 2024-01-11 · in epoll: The API that powers the modern internet (2022) -
…Some Zig libraries implementing an event loop: - libxev by Mitchell Hashimoto https://github.com/mitchellh/libxev - one from the Tigerbeetle DB https://github.com/tigerbeetledb/tigerbeetle/tree/main/src/i... They both use kernel concurr
comment by fbouvier · 2023-03-10 · in Zig: The Modern Alternative to C -
▲ 5
Libxev: A cross-platform, high-performance event loopstory by komuW · 2023-01-26 · 0 comments