5 releases

new 0.0.5 Nov 20, 2024
0.0.4 Nov 19, 2024
0.0.3 Sep 23, 2024
0.0.2 Sep 21, 2024
0.0.1 Sep 17, 2024

#580 in GUI

Download history 60/week @ 2024-09-11 374/week @ 2024-09-18 64/week @ 2024-09-25 14/week @ 2024-10-02 1/week @ 2024-10-09 58/week @ 2024-11-13

62 downloads per month

Apache-2.0

93KB
892 lines

OSUI

Crates.io Version GitHub Org's stars GitHub License

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.

Features

  • Custom rsx syntax.
  • Define and manage UI components.
  • Handle keyboard input seamlessly.
  • Create complex layouts using nested elements.
  • Customizable element sizes and styles.

Getting Started

To use OSUI in your project, include it in your Cargo.toml:

[dependencies]
osui = "0.2"  # Replace with the latest version

Example Usage

Here’s a simple example of how to create a basic UI with OSUI:

use osui::prelude::*;

fn main() {
    run(&mut rsx! {
        text { "Hello, World!" }
    });
}

How it works

Credit to priz.js (discord) for the idea of using C for multithreading

Contributing

Contributions are welcome! If you have suggestions or improvements, feel free to submit a pull request or open an issue.

License

This project is licensed under the Apache License 2.0. See the LICENSE file for details.

Dependencies

~5–14MB
~203K SLoC