Skip to content

tracker: add windows support #34

@wey-gu

Description

@wey-gu

Windows support — status tracker

Rolling tracker for the Windows port. Live design plan: docs/impl/windows-port.md. Related Linux tracker: #18.

TL;DR

Done

Phase 0 — workspace + portable CI

  • Cross-platform workspace and cfg gates.
  • Portable crates compile on Windows.
  • Windows named-pipe control socket (\\.\pipe\con).
  • Feature-gated Windows binary name con-app.exe because CON is a reserved DOS device name.
  • .cargo/config.toml aliases (wbuild, wrun, wtest) for the Windows feature set.
  • Portable CI includes Windows checks.

Phase 1/2 — backend foundation

  • ConPTY spawn, resize, reader/writer pipes, lifecycle, and teardown.
  • Shared libghostty-vt integration through Zig; current validated Zig line is 0.15.2.
  • Generic non-macOS libghostty-vt Zig target selection landed in PR Fix:Linux WSL illegal-instruction startup && inline LaTex #100 so Windows VT artifacts are not tied to the build machine's native CPU feature set.
  • Windows facade types exposed through the same GhosttyApp / GhosttyTerminal shape used by the app.

Phase 3a/3b — renderer and terminal grid

  • D3D11/DirectWrite renderer with runtime-compiled HLSL pipeline.
  • D3D11 instanced grid draw path.
  • Skyline-packed BGRA glyph atlas.
  • IoskeleyMono bundled font resolution and DirectWrite fallback.
  • Nerd-Font / PUA rasterization, atlas bleed fix, wide-glyph z-order, inverse cursor, bold/italic/underline/strikethrough, palette fallback.
  • Offscreen RenderSession bridge into GPUI image rendering; no child HWND dependency in the current path.

Phase 3c — input, selection, shell interaction baseline

  • Keyboard routing through GPUI focus.
  • xterm-style key encoding for function keys, arrows, Home/End/PgUp/PgDn, Insert/Delete, Shift+Tab, Alt-meta, Ctrl-letter.
  • DECCKM and bracketed paste.
  • SGR mouse reports, wheel forwarding, selection rendering, Shift-bypass for app mouse tracking.
  • Win32 clipboard.
  • Pane focus and titlebar/caption button behavior.
  • Fullscreen/maximize bottom-row correctness after the Neovim repro from the beta cycle.
  • CJK IME commit/preedit input via GPUI InputHandler, with cursor-relative candidate bounds and width-aware CJK/wide preedit positioning. Landed in PR [codex] Add Windows and Linux CJK IME input #99.

Phase 3e — latency work landed in #64 + #68

  • Wake GPUI from the ConPTY reader thread.
  • Generate terminal images in the render path so fresh output can land in the current frame.
  • Reduce hot-path work: blank-cell skip, zero-fill removal, conditional wide-glyph sort.
  • Keep low-latency presents armed until VT generation actually advances.
  • Preserve successive output wakes instead of draining bursty command output into one repaint.
  • Treat the staging ring as a mailbox for PTY-driven output.
  • Avoid presenting stale completed readbacks ahead of fresher submitted snapshots.
  • Derive exact dirty rows and use D3D row-region readback for small updates.
  • Replace dirty rows inside a CPU BGRA backing frame before publishing the GPUI image, preserving translucent terminal semantics.
  • Keep command-start output latency-critical long enough for delayed shell output.
  • Follow Windows Terminal default profile selection where possible; CON_SHELL remains explicit override.
  • Add CON_GHOSTTY_PROFILE / CON_LOG_FILE instrumentation for ConPTY, VT snapshot, renderer, render session, and GPUI image handoff timings.

Phase 5 v0 — beta distribution

  • Windows release workflow creates ZIP + SHA256 sums.
  • PowerShell one-line installer path exists.
  • Appcast/update metadata exists.
  • Settings update card and command-palette check action exist.
  • Release channel/version are baked from tags.
  • In-place update path exists for the beta installer flow.

Remaining work

Structural performance

  • Direct presentation inside GPUI: land or obtain a GPUI API for an external DirectComposition/swap-chain surface, then remove the D3D readback + RenderImage re-upload bridge.
  • Re-profile with PIX / GPUView / ETW after direct presentation exists; current instrumentation is sufficient for the existing bridge but not a substitute for GPU timeline validation.

Terminal hardening

  • IME/dead-key/international-keyboard validation matrix across Windows IMEs and keyboard layouts.
  • Double-click word selection, triple-click line selection, drag-to-scroll selection, Alt-drag column selection.
  • Ctrl+Space -> NUL behavior where text events are ambiguous.
  • OSC 133 / OSC 7 shell integration parity.
  • Ligatures and remaining font-shaping polish.
  • Extreme resize, high-DPI, multi-monitor, and multi-GPU edge cases.

Distribution hardening

  • Code signing so SmartScreen trust improves.
  • Signature verification for downloaded update artifacts.
  • Decide final installer format: MSI/MSIX/cargo-dist/winget in addition to the current ZIP + PowerShell installer.
  • ARM64 strategy.

Upstream / GPUI follow-ups

  • External swap-chain / DirectComposition attachment API for GPUI Windows.
  • Optional GPUI close-race log cleanup for benign window not found / invalid-handle noise on teardown.

References

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions