Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Rust
  3. TimonPost/crossterm

TimonPost/crossterm

MITRust0.28

A pure-Rust library for cross-platform terminal manipulation, enabling rich text-based interfaces.

GitHubGitHub
4.0k stars359 forks0 contributors

What is TimonPost/crossterm?

Crossterm is a pure-Rust terminal manipulation library that provides a unified API for building cross-platform text-based interfaces. It enables fine-grained control over terminal features like cursor movement, styled output, and event handling, working consistently across UNIX and Windows terminals down to Windows 7 without requiring platform-specific code.

Target Audience

Rust developers building terminal applications, CLI tools, or text-based user interfaces (TUIs) that need to run reliably on both UNIX-like systems and Windows. It's particularly suited for projects requiring cross-platform compatibility, such as terminal emulators, interactive command-line programs, or console-based games.

Value Proposition

Developers choose Crossterm for its minimal dependencies, idiomatic Rust API, and strong cross-platform support that eliminates the need for platform-specific code. Its fine-grained control over terminal features, including advanced event handling with modifier keys and mouse support, along with performance optimizations for concurrent usage, sets it apart from alternatives.

Overview

Cross platform terminal library rust

Use Cases

Best For

  • Building cross-platform terminal applications that must run on both UNIX and Windows systems without separate codebases.
  • Creating text-based user interfaces (TUIs) with advanced features like mouse input, keyboard event handling with modifiers (SHIFT, ALT, CTRL), and terminal resizing events.
  • Developing CLI tools that require precise terminal control, such as cursor positioning, color output (including 256-color and RGB support), and screen management (e.g., alternate screen, raw mode).
  • Implementing interactive console programs like terminal games or data visualizations that need real-time input processing and styled output.
  • Writing Rust applications that prioritize minimal dependencies and performance, with features like multi-threading support (Send and Sync implementations) and optional feature flags to reduce overhead.
  • Enhancing existing terminal-based projects with cross-platform compatibility, as evidenced by its use in popular tools like Broot, Cursive, and Ratatui.

Not Ideal For

  • Projects needing high-level, pre-styled UI components like menus or dialog boxes without manual terminal manipulation.
  • Applications targeting web-based or graphical interfaces where terminal emulation is irrelevant.
  • Environments with very old or niche terminals that may lack support for advanced features like RGB colors or mouse events, as noted in the 'Tested Terminals' section.
  • Teams prioritizing zero-configuration, drop-in solutions for simple ANSI-based output without managing feature flags.

Pros & Cons

Pros

Cross-Platform Unity

Provides a consistent API across UNIX and Windows terminals down to Windows 7, eliminating platform-specific code, as emphasized in the README's philosophy and features.

Comprehensive Terminal Control

Offers fine-grained features like cursor positioning, styled output with 256-color and RGB support, and event handling with modifiers, detailed in the 'Features' section.

Dependency Flexibility

Allows customization through feature flags to minimize dependencies, such as disabling the 'events' feature to avoid mio and signal-hook, as explained in 'Feature Flags' and 'Dependency Justification'.

Concurrent Ready

Implements Send and Sync traits for safe usage in multi-threaded Rust applications, highlighted in the 'Multi-Threaded' feature and key attributes.

Well-Documented

Includes detailed API documentation and examples, with links to resources like the examples directory and docs.rs, aiding quick adoption.

Cons

Untested Terminal Variability

The README admits that not all terminals are tested, potentially leading to compatibility issues on less common or older systems, which is a risk for production deployments.

Feature Flag Complexity

Advanced capabilities like async event streaming or clipboard support require enabling specific feature flags, adding configuration overhead and potential build errors for newcomers.

Windows-Only Limitations

Some features, such as RGB color support, are limited to Windows 10 and UNIX, with older Windows versions relying on ANSI codes that may not be fully supported, as noted in the styled output section.

Overhead for Basic Tasks

For simple terminal output, Crossterm's extensive API might introduce unnecessary complexity and dependency bloat compared to lighter alternatives that use raw ANSI codes.

Frequently Asked Questions

Quick Stats

Stars4,017
Forks359
Contributors0
Open Issues156
Last commit16 days ago
CreatedSince 2018

Tags

#input#terminal#tui#terminal-styling#text-ui#color#console#cli#cursor#cross-platform#event-handling#rust

Built With

l
libc
s
serde
R
Rust
W
WinAPI
b
bitflags

Included in

Rust56.6k
Auto-fetched 1 day ago

Related Projects

ratatui-org/ratatuiratatui-org/ratatui

A Rust crate for cooking up terminal user interfaces (TUIs) 👨‍🍳🐀 https://ratatui.rs

Stars19,937
Forks633
Last commit3 days ago
clap-rsclap-rs

A full featured, fast Command Line Argument Parser for Rust

Stars16,330
Forks1,171
Last commit1 day ago
indicatifindicatif

A command line progress reporting library for Rust

Stars5,120
Forks277
Last commit3 days ago
CursiveCursive

A Text User Interface library for the Rust programming language

Stars4,784
Forks264
Last commit1 month ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub