cursive/examples/src/bin/hello_world.rs
2020-04-23 17:17:30 -07:00

19 lines
368 B
Rust

use cursive::views::TextView;
use cursive::Cursive;
fn main() {
let mut siv = cursive::default();
// We can quit by pressing `q`
siv.add_global_callback('q', Cursive::quit);
// Add a simple view
siv.add_layer(TextView::new(
"Hello World!\n\
Press q to quit the application.",
));
// Run the event loop
siv.run();
}