A pure-Rust library for cross-platform terminal manipulation, enabling rich text-based interfaces.
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.
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.
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.
Cross platform terminal library rust
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.
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.
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'.
Implements Send and Sync traits for safe usage in multi-threaded Rust applications, highlighted in the 'Multi-Threaded' feature and key attributes.
Includes detailed API documentation and examples, with links to resources like the examples directory and docs.rs, aiding quick adoption.
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.
Advanced capabilities like async event streaming or clipboard support require enabling specific feature flags, adding configuration overhead and potential build errors for newcomers.
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.
For simple terminal output, Crossterm's extensive API might introduce unnecessary complexity and dependency bloat compared to lighter alternatives that use raw ANSI codes.
A Rust crate for cooking up terminal user interfaces (TUIs) 👨🍳🐀 https://ratatui.rs
A full featured, fast Command Line Argument Parser for Rust
A command line progress reporting library for Rust
A Text User Interface library for the Rust programming language
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.