GhosttyVtSPM

0.2.1

Boring wrapper of `libghostty-vt`
caelyreth/libghostty-vt-spm

What's New

0.2.1

2026-07-10T05:45:31Z

   Features

   Performance

    View changes on GitHub

Built from Ghostty commit 35e1a0160c4f6797e1bb1ef8e7a2b8c6b114ab58.

Ghostty VT Swift Package

Swift Package wrapper for upstream libghostty-vt.

Usage

Add this package in SwiftPM and import the Swift-native module:

import GhosttyVt

let terminal = try Terminal(
    configuration: .init(columns: 80, rows: 24)
)
terminal.feed("Hello, world!\\r\\n")

let frame = try terminal.update()
for row in frame.rows {
    for cell in row.cells {
        // Apply each cell's text, style, width, and metadata to your renderer.
    }
}

GhosttyVt owns libghostty-vt handles and returns Swift-owned incremental frames. A full frame contains every viewport row; a partial frame contains only changed rows, which the renderer applies by row index. It does not export C functions, pointers, or C structs. Terminal is thread-safe and Sendable.

Raw API

For an API not yet covered by the Swift facade, import the separate raw overlay:

import GhosttyVtRaw

GhosttyVtRaw re-exports Ghostty's C API from include/ghostty/vt.h.

Platforms

Minimal supported: macOS 14, iOS 17, and macCatalyst 17.

Acknowledgements

License

Copyright © 2026 Yu

Open sourced under the MIT license

Description

  • Swift Tools 6.0.0
View More Packages from this Author

Dependencies

  • None
Last updated: Fri Jul 17 2026 13:04:46 GMT-0900 (Hawaii-Aleutian Daylight Time)