docs.rs failed to build termbox-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
termbox-0.2.0
Termbox is a simple library for writing text based user interfaces. It was originally written in C, and this binding was not written by the original author.
Example
extern crate termbox;
use termbox::{
Termbox,
Event,
BLACK,
WHITE,
BOLD,
KEY_ESC,
};
fn main () {
// Open the terminal
let mut tb = Termbox::open().unwrap();
// Clear the screen to black
tb.set_clear_attributes(BLACK, BLACK);
tb.clear();
// Display a message
tb.put_str(0, 0, "Hello, world!", WHITE | BOLD, BLACK);
tb.put_str(0, 1, "Press Esc to continue", WHITE, BLACK);
tb.present();
// Wait for the user to press Esc
loop {
match tb.poll_event() {
Event::Key(event) => {
if event.key == KEY_ESC {
break;
}
},
_ => {},
}
}
}