cursive/examples/hello_world.rs

17 lines
344 B
Rust
Raw Normal View History

2015-05-09 19:18:25 +00:00
extern crate cursive;
use cursive::Cursive;
use cursive::views::TextView;
2015-05-09 19:18:25 +00:00
fn main() {
let mut siv = Cursive::new();
2016-08-02 07:32:16 +00:00
// We can quit by pressing `q`
siv.add_global_callback('q', Cursive::quit);
2015-05-09 19:18:25 +00:00
2016-08-02 07:32:16 +00:00
siv.add_layer(TextView::new("Hello World!\n\
Press q to quit the application."));
2015-05-15 23:06:48 +00:00
2015-05-09 19:18:25 +00:00
siv.run();
}