From dc2810b6d83309173d3b0dbf47de0e1848f90b7f Mon Sep 17 00:00:00 2001 From: Leo dev Date: Sat, 31 Jan 2026 17:48:25 +0100 Subject: [PATCH] Readme update #40 --- README.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) 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) } ```