#screen #raw #crossterm #terminal #alternate

crossterm_screen

A cross-platform library for raw and alternate screen

5 releases

✓ Uses Rust 2018 edition

0.2.3 May 20, 2019
0.2.2 May 15, 2019
0.2.1 Apr 11, 2019
0.2.0 Apr 10, 2019
0.1.0 Jan 27, 2019

#41 in Command-line interface

Download history 111/week @ 2019-02-04 146/week @ 2019-02-11 114/week @ 2019-02-18 114/week @ 2019-02-25 133/week @ 2019-03-04 73/week @ 2019-03-11 100/week @ 2019-03-18 103/week @ 2019-03-25 127/week @ 2019-04-01 318/week @ 2019-04-08 200/week @ 2019-04-15 317/week @ 2019-04-22 243/week @ 2019-04-29 259/week @ 2019-05-06 488/week @ 2019-05-13

1,059 downloads per month
Used in 2 crates

MIT license

26KB
399 lines

Crossterm Screen | cross-platform alternate, raw screen.

Lines of Code Latest Version MIT docs Join us on Discord

This crate allows you to work with alternate and raw screen cross-platform. It supports all UNIX and windows terminals down to windows 7 (not all terminals are tested see Tested Terminals for more info)

This crate is a sub-crate of crossterm to move between screen buffers and switch to raw-mode, it can be use individually.

Other sub-crates are:

When you want to use other modules as well you might want to use crossterm with feature flags.

In case you are wondering what 'alternate' or 'raw' screen is, you could checkout the book describing this in more detail.

Table of contents:

Getting Started

This documentation is only for crossterm_screen version 0.2. Also, check out the examples folders with detailed examples for all functionality of this crate and the book for more information about how to use the alternate or raw screen options.

Add the crossterm_screen package to your Cargo.toml file.

[dependencies]
crossterm_screen = "0.2"

And import the crossterm_screen modules you want to use.

extern crate crossterm_screen;

pub use crossterm_screen::{AlternateScreen, RawScreen};

Useful Links

Features

These are the features of this crate:

  • Cross-platform
  • Multithreaded (send, sync)
  • Detailed Documentation
  • Few Dependencies
  • Alternate screen
  • Raw screen

Planned features:

  • make is possible to switch between multiple buffers.

Examples

The examples folder has more complete and verbose examples.

Tested terminals

  • Windows Powershell
    • Windows 10 (pro)
  • Windows CMD
    • Windows 10 (pro)
    • Windows 8.1 (N)
  • Ubuntu Desktop Terminal
    • Ubuntu 17.10
  • (Arch, Manjaro) KDE Konsole
  • Linux Mint

This crate supports all Unix terminals and windows terminals down to Windows 7 but not all of them have been tested. If you have used this library for a terminal other than the above list without issues feel free to add it to the above list, I really would appreciate it.

Authors

  • Timon Post - Project Owner & creator

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Dependencies

~576KB