This repository has no description

libghostty: build universal xcframework and release it on tip (#12149) master

This produces a `ghostty-vt.xcframework` for `zig build -Demit-lib-vt` when the host is macOS and the target is Apple platforms. Our CI has been updated to release this via tip channels (GH releases and our blob storage), too. The xcframework contains binaries for macOS Universal (x86_64 + aarch64), iOS, and iOS simulator. I've added a Swift example we run in CI to verify this works. Users can also drag and drop the XCFramework directly into Xcode. ## Example ```swift // swift-tools-version: 5.9 import PackageDescription let package = Package( name: "swift-vt-xcframework", platforms: [.macOS(.v13)], targets: [ .executableTarget( name: "swift-vt-xcframework", dependencies: ["GhosttyVt"], path: "Sources", linkerSettings: [ .linkedLibrary("c++"), ] ), .binaryTarget( name: "GhosttyVt", path: "../../zig-out/lib/ghostty-vt.xcframework" ), ] ) ``` ```swift import GhosttyVt // Create a terminal with a small grid var terminal: GhosttyTerminal? var opts = GhosttyTerminalOptions( cols: 80, rows: 24, max_scrollback: 0 ) let result = ghostty_terminal_new(nil, &terminal, opts) guard result == GHOSTTY_SUCCESS, let terminal else { fatalError("Failed to create terminal") } // Write some VT-encoded content let text = "Hello from \u{1b}[1mSwift\u{1b}[0m via xcframework!\r\n" text.withCString { ptr in ghostty_terminal_vt_write(terminal, ptr, strlen(ptr)) } // Format the terminal contents as plain text var fmtOpts = GhosttyFormatterTerminalOptions() fmtOpts.size = MemoryLayout<GhosttyFormatterTerminalOptions>.size fmtOpts.emit = GHOSTTY_FORMATTER_FORMAT_PLAIN fmtOpts.trim = true var formatter: GhosttyFormatter? let fmtResult = ghostty_formatter_terminal_new(nil, &formatter, terminal, fmtOpts) guard fmtResult == GHOSTTY_SUCCESS, let formatter else { fatalError("Failed to create formatter") } var buf: UnsafeMutablePointer<UInt8>? var len: Int = 0 let allocResult = ghostty_formatter_format_alloc(formatter, nil, &buf, &len) guard allocResult == GHOSTTY_SUCCESS, let buf else { fatalError("Failed to format") } print("Plain text (\(len) bytes):") print(String(cString: buf)) ghostty_free(nil, buf, len) ghostty_formatter_free(formatter) ghostty_terminal_free(terminal) ```


+442 -2
9 changed files