A production-grade terminal emulator built with Rust and GPUI, featuring lock-free rendering, dedicated I/O threading, and comprehensive ANSI support.
- Getting Started: Quick Start Guide
- Architecture: System Design
- Implementation: Current Status
- Performance: Optimization Guide
- Development: Workflow & Contributing
Full Documentation: See docs/README.md
✅ Production Ready - Phase 1 complete with all critical performance optimizations implemented.
- Core terminal emulation: ✅ Complete
- ANSI escape sequences: ✅ Complete
- PTY management: ✅ Complete
- GPU-accelerated rendering: ✅ Complete
- Performance optimizations: ✅ Complete
See Implementation Status for detailed feature list.
- Full ANSI escape sequence support
- 256-color and RGB color support
- Text attributes (bold, italic, underline, strikethrough, etc.)
- Cursor positioning and styling
- Window title management
- Comprehensive terminal modes
- Native PTY management (Unix/Linux/macOS)
- Dedicated I/O thread (non-blocking main thread)
- Blocking I/O with SPSC channels
- Signal handling
- Dynamic window resizing
- GPU-accelerated with GPUI framework
- Lock-free concurrent rendering
- Double-buffering (flicker-free)
- Damage tracking (optimized redraws)
- Glyph caching (reduced CPU)
- Text batching (reduced draw calls)
- Input latency: <10ms
- Frame rate: 60-120 FPS (V-sync limited)
- CPU usage: Minimal (event-driven)
- Memory: Configurable scrollback (typically 500KB per 10K lines)
- Rust 1.70+ (2021 edition)
- Cargo
- Platform-specific: libxcb (Linux), Xcode (macOS)
git clone https://github.com/agustif/rustty.git
cd rustty
cargo build --release./target/release/rusttyFor detailed setup instructions, see Quick Start Guide.
Rustty uses a highly modular architecture with clear separation of concerns:
┌─ rustty (Main Application)
├─ rustty-ui (GPUI-based UI Layer)
├─ rustty-core (Terminal Emulation)
├─ rustty-parser (ANSI Escape Sequences)
├─ rustty-pty (PTY Management)
├─ rustty-render (GPU Rendering)
├─ rustty-config (Configuration)
├─ rustty-font (Font Management)
└─ rustty-platform (Platform Abstraction)
Key Design Decisions:
- Lock-free reads during rendering (Arc-based)
- Dedicated I/O thread for PTY operations
- Event-driven notifications (no polling)
- Double-buffering for flicker-free rendering
- Damage tracking for optimized redraws
See Architecture Guide for complete details.
See Quick Start Guide for detailed setup.
- Code review via pull requests
- Task tracking with Beads
- Comprehensive testing (unit, integration, performance)
- Performance profiling and benchmarking
See Development Workflow.
# Build
cargo build
# Test
cargo test --release
# Format
cargo fmt
# Lint
cargo clippy
# Benchmark
cargo bench --releaseSee Contributing Guide for guidelines on submitting changes.
| Metric | Value | Target | Status |
|---|---|---|---|
| Input Latency (p95) | <10ms | <10ms | ✅ Achieved |
| Frame Rate | 60-120 FPS | 60+ FPS | ✅ Achieved |
| Render Time (p95) | <80µs | <100µs | ✅ Achieved |
| CPU Usage (idle) | <1% | <1% | ✅ Achieved |
- Streaming ANSI parser (reduce latency)
- Incremental rendering (reduce CPU)
- Advanced glyph caching (reduce memory)
- SIMD text processing (faster text ops)
See Performance Roadmap for details.
- ✅ macOS: Fully supported
- ✅ Linux: Fully supported
⚠️ Windows: Basic support (PTY implementation)
- No multiplexing (use separate terminal window)
- No Sixel graphics protocol
- Windows PTY support is basic
- No session persistence
See FAQ for more information.
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
We welcome contributions! See Contributing Guide.
To report bugs or suggest features, use GitHub Issues.
- GPUI: Graphics and UI framework by Zed team
- Rust: Systems programming language
- Terminal Community: ANSI standards and terminal emulator design
- Repository: https://github.com/agustif/rustty
- Documentation: docs/README.md
- Architecture: Architecture Guide
- Development: Development Workflow
Start Here: Quick Start Guide or Architecture Overview
Last Updated: 2025-12-11