From 6fef6fcb491fd666342f7e327efacdf25e71822d Mon Sep 17 00:00:00 2001 From: ddidderr Date: Mon, 12 Oct 2026 16:53:55 +0200 Subject: [PATCH] docs: close out the rewrite in README and STATUS README now describes the full scope (Linux app, C APIs, WASM, crash reporting, macOS/Windows compile-checked), the verification tooling (difftest, visual-parity, check-all) and links DEVIANT_FIXES.md and KNOWN_DIFFERENCES.md. STATUS records completion and the stopping criterion. --- README.md | 25 +++++++++++++++++++++---- docs/rewrite/STATUS.md | 5 +++-- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 6a453fd..00d42b6 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,13 @@ actions; the same `ghostty +action` CLI; the same terminal emulation 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). +All of Ghostty's Zig code is ported: the Linux GTK app (verified at runtime +and pixel-identical to Ghostty 1.3.1), the `libghostty` and `libghostty-vt` +C APIs (same headers/ABI), WASM, crash reporting, and the macOS +(Metal/CoreText) and Windows (ConPTY) code paths. macOS and Windows are +compile-checked on Linux (`just check-macos`, `just check-windows`) but have +not been run natively. The Swift macOS app is not part of the port; it is a +client of the libghostty C API. ## Building and running @@ -26,8 +31,9 @@ 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 +Dev-profile builds (`cargo run`) find `resources/` (shell integration, +themes, terminfo) automatically; other profiles use the installed +resources or `GHOSTTY_RESOURCES_DIR`. Your existing Ghostty config (`~/.config/ghostty/config[.ghostty]`) is used as-is. ## Installing @@ -51,11 +57,22 @@ 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`). +## Verification + +- `just difftest` — differential fuzzing of the terminal core against + Ghostty's own Zig code (sets up Zig 0.15.2 under `target/`). +- `just visual-parity` — pixel comparison against the installed Ghostty in a + headless nested weston. +- `just check-all` — native gate plus macOS/Windows/WASM checks. + ## Documentation - `docs/rewrite/ARCHITECTURE.md` – top-down decomposition, crate map, key design decisions, intentional omissions - `docs/rewrite/STATUS.md` – work package history +- `docs/rewrite/DEVIANT_FIXES.md` – every intentional deviation from Ghostty + (upstream bugs fixed instead of replicated; commits titled `fix-deviant(...)`) +- `docs/rewrite/KNOWN_DIFFERENCES.md` – remaining minor differences - `docs/rewrite/notes/` – per-crate porting notes, deviations from Zig, audits and verification reports diff --git a/docs/rewrite/STATUS.md b/docs/rewrite/STATUS.md index 3aa1d23..012bc3c 100644 --- a/docs/rewrite/STATUS.md +++ b/docs/rewrite/STATUS.md @@ -1,6 +1,6 @@ # Status -**Overall:** Linux/GTK port complete and verified (3038 tests). **Phase 8 in progress:** libghostty C API, libghostty-vt C API, WASM, macOS Zig paths, Windows, crash handling, GTK compat fallbacks, remaining verification + perf. +**Overall: complete (2026-10-12).** Ghostty 1.3.1's Zig code is fully ported to Rust: Linux/GTK app (built, tested, verified at runtime, pixel-identical to the original), libghostty + libghostty-vt C APIs (ABI-checked), WASM (node-tested), macOS and Windows code paths (compile-checked with clippy -D warnings; not runnable here). 3584 tests; terminal core differentially fuzzed against Ghostty's Zig code (390k+ cases, 0 divergences); config/CLI output byte-identical to the installed Ghostty. Review rounds stopped after RV18 per the stopping criterion in PLAN.md. Intentional deviations: DEVIANT_FIXES.md; remaining minor differences: KNOWN_DIFFERENCES.md. Legend: ⬜ todo · 🟨 in progress · ✅ done (gate passed, committed) · ⚠️ done with gaps @@ -97,7 +97,7 @@ Legend: ⬜ todo · 🟨 in progress · ✅ done (gate passed, committed) · ⚠ | RV17 | confirmation Codex verification (clean HEAD) | codex astra | ✅ | RV16 resolved; 6 P3 (Apple freetype, test defect, 3 inspector, Metal alloc register) → Z20 | | Z20 | RV17 P3 items | sonnet | ✅ | 3582 tests; fix-deviant(renderer) | | RV18 | FINAL audit round (stopping criterion) | codex astra | ✅ | RV17 6/6 resolved; fix: input-reachable assert (P2), FreeBSD build (P2), 2 resource-dir issues, 3 register rows; P3 nits → KNOWN_DIFFERENCES | -| Z21 | final fix pass + KNOWN_DIFFERENCES.md | sonnet | 🟨 | last code change before close-out | +| Z21 | final fix pass + KNOWN_DIFFERENCES.md | sonnet | ✅ | 3584 tests; fix-deviant(terminal) | | DEV | DEVIANT_FIXES.md register of all intentional deviations (with commits) | sonnet | ✅ | 30 fixed bugs, 11 kept quirks, 18 other | | RV10 | final Codex verification (RV9 rows + full sweep) | codex astra | ✅ | all prior rows resolved; 8 gaps (1 P1 C buffer len regression) → Z13 | | Z13 | RV10 gaps incl. P1 C action len/alloc mismatch | sonnet | ✅ | | @@ -151,3 +151,4 @@ Legend: ⬜ todo · 🟨 in progress · ✅ done (gate passed, committed) · ⚠ - 2026-10-12: RV17 (Codex needed defensive framing after a false-positive cyber flag) → Z20. - 2026-10-12: Z20 committed (parity + fix-deviant(renderer)). RV18 running. - 2026-10-12: User: avoid endless review loop → stopping criterion: RV18 is the final audit; Z21 final fixes; P3 nits recorded, not chased. +- 2026-10-12: Z21 committed; project closed out per stopping criterion.