A pure Rust, bindless library for low-level terminal handling, manipulation, and reading.
Termion is a pure Rust library for low-level terminal interaction, providing direct TTY communication without external dependencies. It enables fine-grained control over terminal behavior and appearance, such as raw mode, cursor movement, and color support, serving as a full-featured alternative to Termbox. The library is designed to be allocation-free and panic-free, focusing on performance and robust error handling.
Rust developers building terminal applications that require precise control over terminal features, such as text-based user interfaces (TUIs), games, or command-line tools with advanced input/output handling. It is also suitable for developers targeting the Redox operating system or needing cross-platform ANSI terminal support.
Developers choose Termion for its bindless, standalone design that avoids dependencies like ncurses, offering a consistent and low-level API aligned with actual TTY operations. Its unique selling points include allocation-free performance, panic-free error handling, and comprehensive feature coverage like true color, mouse input, and asynchronous key events.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Termion operates directly on TTY without dependencies like ncurses, providing a clean, standalone API as emphasized in the README, reducing external bloat and compatibility issues.
It supports advanced features such as true color, mouse input, and raw mode, covering all essential TTY operations for fine-grained control, as listed in the key features.
Designed to be allocation-free and panic-free, it ensures efficient memory usage and robust error handling, crucial for performance-critical terminal applications.
Works on Redox, Mac OS X, BSD, and Linux ANSI terminals, offering broad compatibility, with explicit Redox support highlighted in the README.
Users must handle terminal escapes and control sequences directly, which can be complex and error-prone compared to abstracted APIs, requiring more boilerplate code.
As noted in the README, for higher-level needs like UI prompts, developers must integrate additional libraries (e.g., inquirer-rs), increasing development overhead.
Major version updates, such as from 1.0.0 to 2.0.0, have introduced breaking changes requiring code modifications, as documented in the migration guides, potentially disrupting projects.
termion is an open-source alternative to the following products: