This document provides a high-level overview of Alacritty, a fast, cross-platform, OpenGL terminal emulator written in Rust. It covers the general architecture, core components, and how they interact to deliver high-performance terminal emulation.
For detailed information on installation procedures, see Getting Started, and for in-depth details about specific subsystems, refer to the respective sections in the Architecture documentation.
Alacritty is a modern terminal emulator that focuses on performance and simplicity. Unlike many other terminal emulators, Alacritty leverages GPU acceleration through OpenGL to render terminal content, resulting in faster rendering speeds even with large amounts of rapidly changing text.
Key characteristics include:
vtebench README.md86-91tmux README.md100-108Sources: README.md5-19 README.md53-71 README.md86-108 CHANGELOG.md34-69
Alacritty's architecture is organized around a central event loop that coordinates between window management, terminal emulation, and rendering subsystems. It supports both standard execution and a headless --daemon mode CHANGELOG.md141
Title: Alacritty Component Interaction
The application entry point manages the winit::event_loop::EventLoop Cargo.lock69 The event::Processor coordinates multiple WindowContext instances, each representing a terminal window Cargo.lock34
Sources: Cargo.lock34-71 alacritty/Cargo.toml1-7 CHANGELOG.md141
Alacritty uses a Cargo workspace with four primary crates, now targeting Rust 1.85.0+ CHANGELOG.md62
| Crate | Location | Purpose | Key Dependencies |
|---|---|---|---|
alacritty | alacritty/ | Main application binary | winit, glutin, crossfont, copypasta |
alacritty_terminal | alacritty_terminal/ | Terminal emulation core | vte, unicode-width, rustix |
alacritty_config | alacritty_config/ | Configuration abstractions | serde, toml |
alacritty_config_derive | alacritty_config_derive/ | Failure resistant deserialization | syn, quote |
Title: Workspace Dependency Relationships
The separation allows alacritty_terminal to be used independently as a library for terminal emulation without GUI dependencies alacritty_terminal/Cargo.toml1-6
Sources: Cargo.toml1-12 alacritty/Cargo.toml13-46 alacritty_terminal/Cargo.toml1-27 CHANGELOG.md62
The terminal emulation logic resides in the alacritty_terminal crate. The core data structure is Term<T> which maintains all terminal state.
Title: Terminal State Hierarchy
Title: PTY Data Pipeline
Key types and their roles:
alacritty_terminal::term::Term: Main terminal state container alacritty_terminal/Cargo.toml2vte::Parser: ANSI/VT escape sequence parser supporting modern extensions like the Kitty keyboard protocol alacritty_terminal/Cargo.toml27 CHANGELOG.md83alacritty_terminal::tty::Pty: Platform-specific PTY implementation using rustix-openpty on Unix alacritty_terminal/Cargo.toml31 and ConPTY on Windows README.md54Sources: alacritty_terminal/Cargo.toml2-31 README.md54 CHANGELOG.md83
The event system processes all window and input events, coordinating interactions between the user and the terminal core.
Title: Event Orchestration
Sources: alacritty/Cargo.toml46 Cargo.lock34-71
The rendering pipeline converts terminal state to GPU-rendered output using OpenGL.
Title: GPU Rendering Stack
Key rendering types:
alacritty::display::Display: Manages the window and OpenGL context via glutin alacritty/Cargo.toml31crossfont::Rasterizer: Font glyph rasterization alacritty/Cargo.toml30Sources: alacritty/Cargo.toml30-31 README.md53-55
Configuration is handled by the alacritty_config crate, supporting failure-resistant deserialization.
Title: Configuration Resolution
Key configuration details:
$XDG_CONFIG_HOME/alacritty/alacritty.toml and a system-wide fallback at /etc/alacritty/alacritty.toml README.md64-76 CHANGELOG.md70alacritty migrate for upgrading TOML configurations CHANGELOG.md140Sources: README.md56-76 CHANGELOG.md70-166 alacritty_config/Cargo.toml1-15
| Platform | PTY Implementation | Key Requirements |
|---|---|---|
| Linux | rustix-openpty | Wayland or X11, OpenGL ES 2.0 README.md18-53 alacritty_terminal/Cargo.toml31 |
| macOS | Unix PTY | macOS 10.12+, requires objc2 for system integration alacritty/Cargo.toml60-74 Makefile39 |
| Windows | ConPTY | Windows 10 1809+, uses windows-sys for Win32 API README.md54 alacritty/Cargo.toml78-83 |
| BSD | Unix PTY | Support for FreeBSD and OpenBSD CHANGELOG.md47-195 |
Sources: README.md18-55 alacritty/Cargo.toml54-83 alacritty_terminal/Cargo.toml30-45 CHANGELOG.md47-195
*, #, {, }, and yank Y CHANGELOG.md66-69alacritty msg for window creation and config retrieval CHANGELOG.md67-111Sources: CHANGELOG.md56-157
Refresh this wiki
This wiki was recently refreshed. Please wait 5 days to refresh again.