Commit Graph
42 Commits
Author SHA1 Message Date
ddidderr 0ed59764e1 docs(rewrite): status update 2026-10-12 11:57:13 +02:00
ddidderr 37a1646611 docs(rewrite): status update 2026-10-12 11:09:29 +02:00
ddidderr e47009e21e docs(rewrite): status update 2026-10-12 11:01:24 +02:00
ddidderr 5f16c24760 docs(rewrite): status update 2026-10-12 10:54:15 +02:00
ddidderr 1ff5db0527 docs(rewrite): status update 2026-10-12 10:34:13 +02:00
ddidderr 3503308385 docs(rewrite): status update 2026-10-12 10:27:45 +02:00
ddidderr 306a19227f docs(rewrite): status update 2026-10-12 10:12:12 +02:00
ddidderr 847a16f65c docs(rewrite): status update 2026-10-12 10:06:14 +02:00
ddidderr 7a3f0b0f2c docs(rewrite): status update 2026-10-12 09:32:55 +02:00
ddidderr 162aa260f1 docs(rewrite): status update 2026-10-12 08:45:38 +02:00
ddidderr 5bfc7bd856 docs(rewrite): status update 2026-10-12 08:22:50 +02:00
ddidderr 86d0d3830f docs(rewrite): status update 2026-10-12 08:16:26 +02:00
ddidderr 96314c1a8b docs(rewrite): status update 2026-10-12 06:55:01 +02:00
ddidderr 6d309d5d16 docs(rewrite): phase 8 status update 2026-10-12 06:38:49 +02:00
ddidderr cd86fe92a8 docs(rewrite): phase 8 status update 2026-10-12 06:03:20 +02:00
ddidderr bab49ee596 feat(macos): port Ghostty's macOS code paths (Metal, CoreText, Darwin)
Ports the macOS-specific Zig code behind cfg(target_os = "macos"):
- renderer: a GraphicsApi trait with generic::Renderer<G>; Metal backend
  (all renderer/metal/* files, shaders.metal verbatim, runtime library
  compile, IOSurface layer, CVDisplayLink), shadertoy -> MSL via naga;
  OpenGL remains the backend elsewhere.
- font: CoreText face, shaper and discovery with build.rs backend
  selection (coretext default; coretext-freetype / coretext-harfbuzz /
  coretext-noshape features), no fontconfig/freetype/harfbuzz on Apple.
- input: KeymapDarwin via UCKeyTranslate, option-as-alt, mac keycodes.
- os: macos, mach, cf_release_thread, NSProcessInfo args and macOS
  branches; config: macOS defaults, keybinds, Application Support paths.
- termio/core: login(1) wrapping, openpty/execvpe, Darwin child exit
  handling, os_log logging.

Compile-checked for aarch64/x86_64-apple-darwin (clippy -D warnings
clean) using the cross setup in docs/rewrite/notes/macos-M1.md; cannot
run here. The embedded runtime/C API (embedded.zig) is the next step.

Also includes the cross-platform integration edits shared by the crash,
verification, Windows and macOS work (Cargo target-gating, thread
crash-context hooks, apprt-gtk surface/IME refactor, termio/os cfg
gates), a cfg fix so ghostty-config builds on wasm32, and an allow for
the intentional recursion in the crash overflow test.

Test Plan:
- cargo test --workspace (3224 passed)
- cargo clippy --workspace --all-targets -- -D warnings
- cargo check --target aarch64-apple-darwin -p ghostty-renderer (with
  the documented cross env)
2026-10-12 06:02:39 +02:00
ddidderr cbc023a633 docs(rewrite): phase 8 status update 2026-10-12 05:22:10 +02:00
ddidderr 03e6e33686 docs(rewrite): extend scope to all of Ghostty's Zig code (phase 8) 2026-10-12 05:05:36 +02:00
ddidderr dcde847c4d docs(rewrite): mark the rewrite complete in STATUS 2026-10-12 05:03:59 +02:00
ddidderr 55a174882b docs(rewrite): status update 2026-10-12 04:41:00 +02:00
ddidderr b65bfc575c docs(rewrite): status update 2026-10-12 04:09:18 +02:00
ddidderr 4de3e3c173 docs(rewrite): status update 2026-10-12 03:58:50 +02:00
ddidderr 2f58f0214d test(core): add headless end-to-end tests and fix bugs they found
Adds crates/ghostty-core/tests/e2e_*.rs: 81 tests that drive the real
core Surface, termio, pty and child processes through a fake runtime
(recording apprt actions, in-memory clipboard) with a headless renderer
(ghostty-renderer/src/headless.rs). They cover keys (legacy, DECCKM,
kitty, modifyOtherKeys), keybinding actions and sequences, mouse
selection/reporting/scrolling/links, clipboard incl. OSC 52 and paste
safety, resize, focus, titles/pwd/bell/notifications/progress, child
exit, and IME preedit.

Fixes for issues found by the tests and by the Codex audit
(docs/rewrite/notes/review-core-codex.md, all 9 items):
- replacing a selection with copy-on-select panicked (stale tracked
  handles); global new_window no longer inherits a parent; the child
  environment uses the runtime's env wholesale so GTK's removals stick;
  Flatpak host resources path; locale recovery (ensureLocale) in
  apprt-gtk before GTK init and for CLI actions; failed screen-file
  opens propagate errors; OSC 52 base64 rules, CSI/ESC binding length
  limits and GHOSTTY_LOG parsing match Zig.
- Also includes V2's termio cleanups (tmux viewer wiring in the stream
  handler, Pty slave semantics docs, shared cgroup wait loop).

apprt-gtk gains a debug input replay hook (GHOSTTY_DEBUG_INPUT_SCRIPT)
exercising the real GTK key path. With it, the real app was verified on
Wayland: typing and output, new tab, splits, select-all/copy/paste and
font size all work (docs/rewrite/notes/verification-V1.md). Not yet
exercised at GTK level: mouse, real IM-context IME, clipboard dialogs.

Test Plan:
- cargo test --workspace (2983 passed)
- cargo test -p ghostty-core --tests (81 e2e tests)
2026-10-12 03:58:19 +02:00
ddidderr bd48c39d5f docs(rewrite): status update 2026-10-12 03:46:21 +02:00
ddidderr 5c8d02740f docs(rewrite): status update 2026-10-12 02:08:22 +02:00
ddidderr e9345ecbd4 docs(rewrite): status update 2026-10-12 01:39:42 +02:00
ddidderr e5ca2303da docs(rewrite): status update for phase 7 2026-10-12 01:35:00 +02:00
ddidderr e256c42e53 docs(rewrite): status update 2026-10-11 23:10:31 +02:00
ddidderr 4a40470746 docs(rewrite): status after GTK port and terminal integration 2026-10-11 22:57:46 +02:00
ddidderr 6675db1eeb docs(rewrite): status update 2026-10-11 22:52:28 +02:00
ddidderr 59d1069692 docs(rewrite): status update 2026-10-11 22:50:42 +02:00
ddidderr 225f5ae2d7 docs(rewrite): record remaining PageList API requests 2026-10-11 22:41:26 +02:00
ddidderr d24b40cf2b docs(rewrite): status update 2026-10-11 22:40:10 +02:00
ddidderr 0b31fd81e8 docs(rewrite): status update 2026-10-11 22:39:16 +02:00
ddidderr b64a2886ec docs(rewrite): status update 2026-10-11 22:28:40 +02:00
ddidderr 461b0c78e4 docs(rewrite): status update 2026-10-11 22:26:45 +02:00
ddidderr 0dc38255d9 docs(rewrite): status after cli port 2026-10-11 22:22:01 +02:00
ddidderr a97ae04f1d docs(rewrite): status update 2026-10-11 22:13:47 +02:00
ddidderr 668c236291 docs(rewrite): status update 2026-10-11 22:00:52 +02:00
ddidderr b0421fea32 docs(rewrite): update status after config port 2026-10-11 22:00:12 +02:00
ddidderr b96984b020 docs(rewrite): track cross-crate integration TODOs and status 2026-10-11 21:54:18 +02:00
ddidderr 864ef82acb chore: scaffold Cargo workspace for the Ghostty rewrite
Start of the full Rust rewrite of Ghostty 1.3.1 (reference source in
../ghostty). Sets up a workspace whose crates mirror Ghostty's Zig modules
(vt, unicode, datastruct, os, input, config, terminal, font, renderer,
termio, core, apprt-gtk) so porting work can proceed in parallel per crate.

Also adds:
- docs/rewrite/{ARCHITECTURE,PLAN,STATUS,AGENT_GUIDE}.md: crate map, core
  design decisions (safe Rust, slab-based PageList, logical capacity
  accounting), phased plan, progress tracker, and porting rules.
- Workspace clippy config relaxing pedantic lints that are pure noise for
  low-level terminal code (casts, long functions).
- Shared vt types needed by several work packages up front: kitty
  keyboard flags (kitty/key.rs) and the CSI separator bitset (SepList).

Test Plan:
- cargo test -p ghostty-vt (3 tests pass)
- cargo clippy -p ghostty-vt --all-targets -- -D warnings
2026-10-11 21:41:11 +02:00