Skip to content

TUI framework, Redux store, non binary tree & graph data structures, proc macros, and more in Rust

License

Notifications You must be signed in to change notification settings

zoo868e/r3bl-open-core

 
 

Repository files navigation

🪷 If you are interested in contributing to this project, please read our 📒 contributing guide.

Context

R3BL TUI library & suite of apps focused on developer productivity

We are working on building command line apps in Rust which have rich text user interfaces (TUI). We want to lean into the terminal as a place of productivity, and build all kinds of awesome apps for it.

🔮 Instead of just building one app, we are building a library to enable any kind of rich TUI development w/ a twist: taking concepts that work really well for the frontend mobile and web development world and re-imagining them for TUI & Rust.

  • Draw inspiration from declarative and reactive frameworks for web, mobile, and desktop, to create responsive TUIs.
  • The idea here is not to rebuild tmux in Rust (separate processes mux'd onto a single terminal window). Rather it is to build a set of integrated "apps" (or "tasks") that run in the same process that renders to one terminal window.
  • Inside of this terminal window, we can implement things like "app" switching, routing, tiling layout, stacking layout, etc. so that we can manage a lot of TUI apps (which are tightly integrated) that are running in the same process, in the same window. So you can imagine that all these "app"s have shared application state. As the application state is modified via user input events, API callbacks, and animator updates, this results in performant re-renders, and repaints of only parts of the UI that have changed.
  • Here are some examples of the types of "app"s we are building using this engine:
    1. multi user text editors w/ syntax highlighting
    2. integrations w/ github issues
    3. integrations w/ calendar, email, contacts APIs

🦜 To learn more about this library, please read how it was built (on developerlife.com):

  1. https://developerlife.com/2022/02/24/rust-non-binary-tree/
  2. https://developerlife.com/2022/03/12/rust-redux/
  3. https://developerlife.com/2022/03/30/rust-proc-macro/

🦀 You can also find all the Rust related content on developerlife.com here.


Table of contents

Folder structure and code organization

This repo is organized as a monorepo. Each folder is a Rust crate. There's a Cargo.toml file at the top level which provides a workspace that allows us to build all the crates in this repo at the same time.

Issues, comments, feedback, PRs, and Discord

  • To contribute please check out this page.
  • Please report any issues to the issue tracker.
  • Check out our contributor guide here.
  • And if you have any feature requests, feel free to add them there too 👍.
  • And we have a discord server if you would like to chat about the issue or PR.

ansi_color folder -> r3bl_ansi_color crate

Rust crate to generate formatted ANSI 256 (8-bit) and truecolor (24-bit) color output to stdout. On macOS, the default Terminal.app does not support truecolor, so ANSI 256 colors are used instead.

README for the r3bl_ansi_color crate.

tuify folder -> r3bl_tuify crate

This crate can be used in two ways:

As a library. This is useful if you want to add simple interactivity to your CLI app written in Rust. You can see an example of this in the examples folder in the main_interactive.rs file. You can run it using cargo run --example main_interactive.

Here's a demo of the library target of this crate in action.

tuify-alpha-2023-09-07_21.45.08.mp4

As a binary. This is useful if you want to use this crate as a command line tool. The binary target is called rt.

Here's a demo of the binary target of this crate in action.

tuify-pipes-alpha-2023-09-10_11.22.12.mp4

For more information please read the README for the r3bl_tuify crate.

tui folder -> r3bl_tui crate

For more information please read the README for the r3bl_tui crate.

Here's a video of the demo in action:

video-gif

Here's a video of a prototype of R3BL CMDR app built using this TUI engine.

rc

About

TUI framework, Redux store, non binary tree & graph data structures, proc macros, and more in Rust

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 98.2%
  • Nushell 1.7%
  • Other 0.1%