cursive/examples/hello_world.rs
2015-05-23 17:07:22 -07:00

16 lines
313 B
Rust

extern crate cursive;
use cursive::Cursive;
use cursive::view::TextView;
fn main() {
let mut siv = Cursive::new();
// We can quit by pressing q
siv.add_global_callback('q' as i32, |s| s.quit());
siv.add_layer(TextView::new("Hello World!\nPress q to quit the application."));
siv.run();
}