SwiftTerm uses the Swift Package Manager for its build, and you can add the library to your project by using the url for this project or a fork of it.
Mac vt100 emulator code#
Given that those two share a lot of common traits, the shared code is under Apple. The engine is in this directory, while code for macOS lives under Mac, and code for iOS, lives under iOS.
The front-ends are conditionally compiled based on the target platform. The SwiftTerm library itself contains the source code for both the engine and the front-ends.
Mac vt100 emulator how to#
Sample Code There are a couple of minimal sample apps for Mac and iOS showing how to use the library inside the TerminalApp directory. A curses-based terminal emulator (to emulate an xterm inside a console application) is available as part of the TermKit library. This repository contains both a terminal emulator engine that is UI agnostic, as well as front-ends for this engine for iOS using UIKit, and macOS using AppKit. SwiftTerm is a VT100/Xterm terminal emulator library for Swift applications that can be embedded into macOS, iOS applications, text-based, headless applications or other custom scenarios.