29 releases (breaking)

Uses old Rust 2015

0.27.0 Mar 30, 2019
0.25.0 Mar 1, 2019
0.20.0 Apr 3, 2018
0.19.0 Mar 4, 2018

#1049 in Hardware support

Download history 48/week @ 2023-05-31 31/week @ 2023-06-07 16/week @ 2023-06-14 49/week @ 2023-06-21 62/week @ 2023-06-28 12/week @ 2023-07-05 8/week @ 2023-07-12 13/week @ 2023-07-19 15/week @ 2023-07-26 7/week @ 2023-08-02 12/week @ 2023-08-09 40/week @ 2023-08-16 35/week @ 2023-08-23 7/week @ 2023-08-30 43/week @ 2023-09-06 41/week @ 2023-09-13

126 downloads per month

MIT license

81KB
2K SLoC

prototty_unix

Version Documentation

A prototty frontend for unix terminals. Provides a Context which can render a view to the terminal, and several ways to get input from the terminal.

Example

Let's continue the title example started here:

extern crate prototty;
extern crate prototty_unix;

// Assuming the title and its views were defined here
extern crate prototty_title;

use prototty::Renderer;
use prototty_title::*;

fn main() {

    let mut context = prototty_unix::Context::new().unwrap();

    let title = Title {
        width: 20,
        text: "My Title".to_string(),
    };

    // render the title using the DemoTitleView
    context.render(&DemoTitleView, &title).unwrap();

    // exit after a key is pressed
    context.wait_input().unwrap();
}

Running this will produce the following output in your terminal:

Example

Dependencies

~0.3–0.8MB
~14K SLoC