From c7f5f34eb5c23d4e63e7c8a7b57407daa28c40d8 Mon Sep 17 00:00:00 2001 From: Florian Dehau Date: Mon, 28 Nov 2016 10:16:50 +0100 Subject: [PATCH] Update README --- README.md | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ca84fc38..a06678e1 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ you may rely on the previously cited libraries to achieve such features. ```toml [dependencies] -tui = "0.1" +tui = "0.1.1" ``` ## Get Started @@ -44,7 +44,8 @@ The first thing to do is to choose from one of the two backends: For Termion: ```rust -use tui::{Terminal, TermionBackend}; +use tui::Terminal; +use tui::backend::TermionBackend; fn main() { let backend = TermionBackend::new().unwrap(); @@ -55,7 +56,8 @@ fn main() { For Rustbox: ```rust -use tui::{Terminal, RustboxBackend}; +use tui::Terminal; +use tui::backend::RustboxBackend; fn main() { let backend = RustboxBackend::new().unwrap(); @@ -63,6 +65,17 @@ fn main() { } ``` +By default both backends are enabled but you might want to use only one. To do +so, you should disable the default-features for this library and specify the +chosen backend in features. + +```toml +[dependencies.tui] +version = "0.1.1" +default-features = false +features = ['termion'] +``` + ### Layout The library comes with a basic yet useful layout management object called