mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-05-27 15:25:19 +00:00
The xcframework now generates its own headers directory with a GhosttyVt module map instead of reusing include/ directly, which contains the GhosttyKit module map for the macOS app. The generated directory copies the ghostty headers and adds a module.modulemap that exposes ghostty/vt.h as the umbrella header. A new swift-vt-xcframework example demonstrates consuming the xcframework from a Swift Package. It creates a terminal, writes VT sequences, and formats the output as plain text, verifying the full round-trip works with swift build and swift run.
24 lines
499 B
Markdown
24 lines
499 B
Markdown
# swift-vt-xcframework
|
|
|
|
Demonstrates consuming libghostty-vt from a Swift Package using the
|
|
pre-built XCFramework. Creates a terminal, writes VT sequences into it,
|
|
and formats the screen contents as plain text.
|
|
|
|
This example requires the XCFramework to be built first.
|
|
|
|
## Building
|
|
|
|
First, build the XCFramework from the repository root:
|
|
|
|
```shell-session
|
|
zig build -Demit-lib-vt
|
|
```
|
|
|
|
Then build and run the Swift package:
|
|
|
|
```shell-session
|
|
cd example/swift-vt-xcframework
|
|
swift build
|
|
swift run
|
|
```
|