Skip to content

docs: record the embedding spike - the official path is vt + own renderer - #26

Merged
kiyeonjeon21 merged 1 commit into
mainfrom
docs/embedding-spike
Jul 25, 2026
Merged

docs: record the embedding spike - the official path is vt + own renderer#26
kiyeonjeon21 merged 1 commit into
mainfrom
docs/embedding-spike

Conversation

@kiyeonjeon21

Copy link
Copy Markdown
Owner

What

Records ROADMAP step 8 phase 2 (the embedding spike) as done, with the findings that corrected the plan before any product code was written.

The correction

The plan said "GhosttyKit pane via libghostty-spm". That package does not exist: there is no official Swift package for the full GhosttyKit render path, only third-party binary redistributions of an API whose own header warns it is unstable. The official embedding path today is libghostty-vt (the state machine) + your own renderer, demonstrated by ghostty-org/ghostling (official, MIT, active) - and ghostty's own build emits a ready-made ghostty-vt.xcframework with a modulemap, so no third-party repackaging is needed at all.

What was proven on this machine

  • ghostling builds from official source (Zig pinned at 0.15.x, its stated requirement) and runs
  • The spike app - one window, a terminal pane running a login shell - builds and runs with:
ghostty-vt probe: simd=true roundTrip=true

Swift <-> Zig interop with the official artifact works: create a terminal, feed VT bytes through the parser, free.

The architecture that follows

SwiftTerm pane behind a TerminalPane protocol - nothing else may import a terminal library - with libghostty-vt linked and probed but not yet rendering. When the full embedding API stabilizes, the swap is an implementation project, not a feasibility question.

cmux was not studied and did not need to be: ghostling is official and MIT, so the GPL-adjacency question never arises.

Spike repo: ~/dev/personal/projects/datactx-app (local; brand-independent name pending step 9).

🤖 Generated with Claude Code

https://claude.ai/code/session_01CKZ9UVgw2Mhiu6T5YAG7k6

…erer

The spike (repo datactx-app, brand-independent name pending the rename) proved
the toolchain and corrected the plan before any product code:

- There is no official Swift package for the full GhosttyKit render path, only
  third-party binary redistributions of an unstable API. The official embedding
  path today is libghostty-vt plus your own renderer, demonstrated by
  ghostty-org/ghostling (official, MIT) - and ghostty's build emits a ready-made
  ghostty-vt.xcframework, so no third-party repackaging is needed.
- Verified here: ghostling builds from source (Zig pinned 0.15.x) and runs; the
  spike app builds and runs with ghostty-vt probe simd=true roundTrip=true.
- Architecture: SwiftTerm pane behind a TerminalPane protocol, libghostty-vt
  linked and probed but not rendering. The renderer swap becomes an
  implementation project once the API stabilizes.
- cmux was not studied and did not need to be: ghostling is official and MIT,
  so the GPL-adjacency question never arises.
@kiyeonjeon21
kiyeonjeon21 merged commit 21e72b3 into main Jul 25, 2026
1 check passed
@kiyeonjeon21
kiyeonjeon21 deleted the docs/embedding-spike branch July 25, 2026 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant