Architecture
Terminal emulation, native rendering, session transport and configuration.
Application architecture
Moth is written in Swift with AppKit, with a controller for each window and a local PTY for each shell. SwiftTerm handles terminal emulation. CoreText and CoreGraphics draw the text, while Metal and Core Animation handle the optional background.
Terminal and configuration libraries
Moth uses SwiftTerm v1.10.1 for terminal emulation, with adaptations for native rendering, text selection, image reflow and recoverable PTY transport.
TOMLKit 0.6.0 and toml++ provide TOML parsing. Source-position tracking allows configuration edits to preserve comments. These libraries are distributed under the MIT licence. See Credits & licences for project links.
Measured performance
The performance measurements document startup time, idle CPU use, memory and PTY throughput for Moth 0.27.4, with the hardware, configuration and measurement method.
Source code
Moth is source-available under the Moth Source-Available Licence 1.0. You can use it for any purpose, modify it and share free copies or forks. Charging for Moth or a fork requires written permission. If you distribute a build, make its corresponding source available to recipients free of charge.
The Moth app repository contains the source, build instructions and contribution guide. Use Conventional Commits for commits and pull request titles. See Credits & licences for the font permissions and branding policy.