馃И Add Ghostty GPU frame export for isolated terminal workers - #17
Merged
Merged
Conversation
arach
marked this pull request as ready for review
September 16, 2026 21:00
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem and result
Hudson's isolated terminal helper needs to export real Ghostty frames without holding renderer-owned targets across processes. The pinned embedding API has no such ownership contract. This draft adds a private macOS export extension: the helper appends a GPU copy into its own bounded IOSurface pool before the engine command buffer commits, publishes after producer completion, and reuses the destination only after consumer acknowledgement.
The companion consumer is Hudson #229. Its XPC helper owns the actual PTY, parser and renderer; the host uses AppKit/Metal without SwiftUI. No published binary pin or production consumer changes here.
Changes
--xcframework-target native|universalto the build script; universal remains the default.git applyaccepts it.Validation
git apply --cachedto pinned Ghostty07d31666e73bce337b9cece60a884c67fe8906f4in a temporary index.bash -n scripts/build-ghosttykit.sh, build-script help andgit diff --check: PASS.The checked-in compiler validation workflow builds from the pinned source with checksum-verified Zig, records SDK/source/patch hashes and uploads the exact framework. Hudson verifies the downloaded library SHA-256 before linking it into the local runtime test. The separate build/install wrapper was syntax/help checked, not run end to end. Counts establish correctness and progress, not maximum throughput or display scanout latency. The one-time evidence image and drawable pixel readback are diagnostic instrumentation.
Limits and release gates
The initial SDK-overlay proof has been superseded by the clean Xcode 26.3 build and a successful checksum-matched runtime test on the mini (macOS 26.6.2). This closes the native arm64 engine compiler gate. The local AppKit host fixture was compiled with installed CLT/macOS 26.5 SDK, targeting macOS 14. Intel, universal/iOS builds, runtime coverage across supported OS releases, signing and release packaging remain unqualified. No installed SDK, published engine binary or release pin changed.
Production also needs complete input/IME/selection/accessibility, dynamic viewport/pool generations, crash recovery, peer signing, multiple panes, a second consumer and matched performance/soak checks. The additional GPU copy needs measurement before choosing the production frame-export design. Keep this draft while those integration and qualification gates remain open.