diff --git a/README.md b/README.md index 4b28b99..e20e2dc 100644 --- a/README.md +++ b/README.md @@ -17,21 +17,23 @@

- OSUI is a customizable terminal user interface (TUI) library written in Rust. It provides a set of components and rsx to build interactive command-line interfaces with ease. + OSUI is a customizable terminal user interface (TUI) library written in Rust.

```rust use osui::prelude::*; -fn main() -> std::io::Result<()> { - let screen = Screen::new(); +pub fn main() { + let engine = Console::new(); + engine.run(App {}).expect("Failed to run engine"); +} +#[component] +fn App(cx: &Arc) -> View { rsx! { - "Hello, World" + "Hello World" } - .draw(&screen); - - screen.run() + .view(&cx) } ```