Resolves the 4 P3 items in docs/rewrite/notes/review-rv13-codex.md (final-Z16.md): - async-backend now takes effect like Ghostty: ghostty_os::xev ports libxev's backend detection (io_uring, then epoll); global init detects and logs it, the GTK startup applies the config with Zig's messages, and +version reports the real backend. The termio IO loop runs on a new reactor with epoll, io_uring (io-uring crate) and poll(2) (kept for macOS, where libxev uses kqueue). The 21 exec integration tests run under every backend; io_uring was exercised here. - auto-update-channel defaults to the build's release channel. - Windows error names: sharing violation -> AccessDenied, plus ERROR_FILE_EXISTS -> PathAlreadyExists and virus errors -> AntivirusInterference, mirroring std.os.windows.OpenFile's NTSTATUS mapping in Zig 0.15.2 (verified against its source by the orchestrator). - Exact ports of std.fs.path.basenameWindows/basenamePosix for theme name validation (drive, UNC and device roots). Test Plan: - cargo test --workspace --no-fail-fast (3555 passed, exit 0) - just check-macos (both), just check-windows, just check-wasm - +show-config --default --docs vs /usr/bin/ghostty (only the build-specific gtk-opengl-debug line differs)
ghostty-rs
A Rust rewrite of the Ghostty 1.3.1 terminal emulator for Linux (GTK4 + libadwaita, OpenGL).
It aims for behavioural parity with Ghostty: the same configuration file
format, options, defaults and documentation; the same keybindings and
actions; the same ghostty +action CLI; the same terminal emulation
(including kitty keyboard/graphics protocols, OSC 8 hyperlinks, semantic
prompts, synchronized output, tmux control mode); the same shell
integration, themes and terminfo.
Out of scope: macOS, Windows, WASM, the embedded libghostty C API, and
Sentry crash reporting (disabled by default on Linux upstream).
Building and running
Requirements: Rust (edition 2024), GTK ≥ 4.14, libadwaita ≥ 1.5,
fontconfig, freetype, harfbuzz, Oniguruma, libepoxy, blueprint-compiler
and glib-compile-resources at build time.
cargo run # open a terminal window running your shell
cargo run -- -e htop # run a command
cargo run -- +list-themes # CLI actions work like Ghostty's
cargo run --profile production # optimized build (LTO, no debug assertions)
Development builds find resources/ (shell integration, themes, terminfo)
automatically. Your existing Ghostty config
(~/.config/ghostty/config[.ghostty]) is used as-is.
Installing
just install /usr/local # binary, share/ghostty, terminfo, desktop files,
# completions, man pages, translations, icons
just install /usr false true # system-package layout (lib/systemd/user)
Testing
just test # cargo test --workspace (~3000 tests)
just clippy # clippy with -D warnings
Every Zig test block of the ported files was ported to a Rust test.
crates/ghostty-core/tests holds end-to-end tests that drive the real core,
terminal and a real pty through a fake app runtime. ghostty-bench mirrors
Ghostty's benchmark tool; terminal stream throughput is on par with the Zig
build (see docs/rewrite/notes/perf-P1.md).
Documentation
docs/rewrite/ARCHITECTURE.md– top-down decomposition, crate map, key design decisions, intentional omissionsdocs/rewrite/STATUS.md– work package historydocs/rewrite/notes/– per-crate porting notes, deviations from Zig, audits and verification reports
License
MIT, like Ghostty. Bundled fonts and themes carry their own licenses (see
crates/ghostty-font/res/ and resources/themes/).