diff options
| author | Mitchell Hashimoto <m@mitchellh.com> | 2025-02-20 21:38:49 -0800 |
|---|---|---|
| committer | Mitchell Hashimoto <m@mitchellh.com> | 2025-02-21 15:04:37 -0800 |
| commit | d532a6e260960fd427e438ff55ff74f14edc518c (patch) | |
| tree | ef350b6a2b570c80736d38070c5a7b353a6f6ec4 /src/termio/Termio.zig | |
| parent | 38908e01268298ced33b7b6835e49b8c6d437e12 (diff) | |
Update libxev to use dynamic backend, support Linux configurability
Related to #3224
Previously, Ghostty used a static API for async event handling: io_uring
on Linux, kqueue on macOS. This commit changes the backend to be dynamic
on Linux so that epoll will be used if io_uring isn't available, or if
the user explicitly chooses it.
This introduces a new config `async-backend` (default "auto") which can
be set by the user to change the async backend in use. This is a
best-effort setting: if the user requests io_uring but it isn't
available, Ghostty will fall back to something that is and that choice
is up to us.
Basic benchmarking both in libxev and Ghostty (vtebench) show no
noticeable performance differences introducing the dynamic API, nor
choosing epoll over io_uring.
Diffstat (limited to 'src/termio/Termio.zig')
| -rw-r--r-- | src/termio/Termio.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/termio/Termio.zig b/src/termio/Termio.zig index 8a2e6cc7a..1d125f049 100644 --- a/src/termio/Termio.zig +++ b/src/termio/Termio.zig @@ -18,7 +18,7 @@ const Pty = @import("../pty.zig").Pty; const StreamHandler = @import("stream_handler.zig").StreamHandler; const terminal = @import("../terminal/main.zig"); const terminfo = @import("../terminfo/main.zig"); -const xev = @import("xev"); +const xev = @import("../global.zig").xev; const renderer = @import("../renderer.zig"); const apprt = @import("../apprt.zig"); const fastmem = @import("../fastmem.zig"); |
