Prerequisites
Rust Toolchain
Termy requires Rust with edition 2024 support:System Dependencies
macOS
macOS
Required:
- Xcode Command Line Tools:
- macOS SDK 10.15+ (usually included with Xcode)
- just task runner:
- create-dmg for DMG creation:
- Termy detects macOS SDK >= 26 at build time for feature flags
- Core-text is pinned to 21.0.0 to avoid core-graphics conflicts
Windows
Windows
Required:
- Visual Studio 2019+ with C++ build tools
- Windows 10 SDK
- Inno Setup 6 for installer creation
- PowerShell 5.1+ (usually pre-installed)
- just (install via cargo):
- The build script embeds
assets/termy.icointo the binary - Windows subsystem is set to
windows(no console window)
Linux
Linux
Git
Termy has git dependencies (GPUI, alacritty_terminal):Clone the Repository
- Source code (
src/,crates/) - Build scripts (
justfile,scripts/) - Assets (
assets/,themes/) - Documentation (
docs/)
Build Commands
Quick Start
Build and run Termy in release mode:Development Build
For faster iteration (unoptimized):- Debug assertions
- Render metrics support (set
TERMY_RENDER_METRICS=1) - Faster compilation
Build Only
Compile without running:target/release/termy(ortermy.exeon Windows)target/debug/termy(debug build)
Using Just
Thejustfile provides convenient aliases:
Workspace Check
Verify all crates compile:- Main
termybinary - All 15 workspace crates
- Platform-specific code (where applicable)
Platform-Specific Builds
macOS: Building a DMG
Create a distributable DMG installer:--version VERSION: Version string (defaults to Cargo.toml)--arch ARCH:arm64orx86_64--target TARGET:aarch64-apple-darwinorx86_64-apple-darwin--no-layout: Skip Finder layout customization
target/release/Termy-0.1.40-macos-arm64.dmg
Signed & Notarized DMG:
- Valid Apple Developer ID certificate
- Notarization credentials in Keychain (via
xcrun notarytool store-credentials)
Windows: Building an Installer
Create a Windows Setup.exe:-Version: Version string-Arch:x64orx86-Target:x86_64-pc-windows-msvcori686-pc-windows-msvc
target/release/Termy-Setup-0.1.40-x64.exe
Cross-Compilation
Build for different targets:aarch64-apple-darwin(macOS Apple Silicon)x86_64-apple-darwin(macOS Intel)x86_64-pc-windows-msvc(Windows 64-bit)x86_64-unknown-linux-gnu(Linux)
Running from Source
Basic Execution
With Environment Variables
Enable logging and debug features:error, warn, info, debug, trace
Running Specific Binaries
The workspace includes multiple binaries:Development Workflow
Check Before Building
Fast syntax/type checking:Run Tests
Architecture Validation
Run dependency boundary checks:- No GPUI in CLI crates
- No circular config dependencies
- Fresh generated documentation
Generate Documentation
Auto-generate reference docs:Debug Features
Render Metrics
Monitor terminal rendering performance (debug builds only):full: Full cell cache rebuildspartial: Dirty-span updatesreuse: Cache reuse (no update)dirty_span: Dirty span countpatched_cell: Cells patchedgrid_paint,shape_line: Paint/shaping work
full should stay near 0 during cursor blink; reuse or small partial values indicate efficient rendering.
Tmux Integration Testing
Test tmux split functionality:- tmux >= 3.3
- Optional:
TERMY_TEST_TMUX_BIN=/custom/path/to/tmux
Troubleshooting
Linker Errors (Linux)
If you see linker errors about missing libraries:GPUI Build Errors
GPUI requires specific system libraries. Ensure you have:- macOS: Xcode Command Line Tools
- Windows: Visual Studio C++ build tools
- Linux: X11/xcb development libraries
Cargo.lock Conflicts
If git dependencies fail to resolve:Slow Builds
Speed up compilation:Next Steps
- Architecture - Understand the codebase structure
- Contributing - Submit changes to Termy
- Configuration - Customize your build