r3bl-org / r3bl-open-core

TUI framework and developer productivity apps in Rust 🦀
https://r3bl.com
Apache License 2.0
351 stars 20 forks source link
cli cli-app command-line concurrent console editor hacktoberfest linux macos parallel productivity rust syntax-highlighting terminal tui tuify vte windows

r3bl-open-core

Welcome to this monorepo. All the folders in this repo are separate Rust projects (crates) that are probably published to crates.io. And this constitutes a Rust workspace.

Here's the changelog for this monorepo or Rust workspace. This is a great place to start to get familiar with what has changed recently in each of the projects in this Rust workspace.

Table of contents:

This workspace contains many TUI, CLI, TTY crates

The following is a high level overview of each of the crates that constitute this Rust workspace.

There are crates that range from "full" TUI to "partial" TUI, and everything in the middle.

Full TUI (async, raw mode, full screen) for immersive TUI apps

r3bl_tui gives you raw mode "alternate screen" and "full screen" support, while being totally async. An example of this is the "Full TUI" app edi in the r3bl-cmdr crate. You can install & run this with the following command:

cargo install r3bl-cmdr
edi

Partial TUI (async, partial raw mode) for async REPL and shell programs

r3bl_terminal_async gives you the ability to easily build your own async shell programs using "async readline & stdout".

Here are examples of this:

  1. https://github.com/nazmulidris/rust-scratch/tree/main/tcp-api-server
  2. https://github.com/r3bl-org/r3bl-open-core/tree/main/terminal_async/examples

Minimum TUI (sync, blocking, partial raw mode) for simple CLI programs with blocking interaction

r3bl_tuify gives you the ability to easily build your own CLI programs with blocking interaction. This is a great to get user input, while blocking the main thread, and using raw mode while the main thread is blocked. An example app of this is the giti app in the r3bl-cmdr crate. You can install & run this with the following command:

cargo install r3bl-cmdr
giti

Underlying crates

There are many other underlying crates that are used to build these top level crates. Here's a short list of them:

Top level user facing crate

There's even a crate that only contains user facing apps that are built using these underlying crates. This is the r3bl-cmdr crate, which gives you the giti and edi apps (described above). You can install & run this with the following command:

cargo install r3bl-cmdr

Learn how these crates are built, provide feedback

To learn how we built this crate, please take a look at the following resources.

Building the workspace, CI/CD, and testing

There's a nushell script that you can use to run the CI/CD pipeline for this workspace, and more (local only operations). To get a list of these, you can view the nushell script in the root of this repo run. To get an idea of the commands that you can run, try running the following command:

cargo install nu
nu run

You should see output that looks like this:

Usage: run <command> [args]
<command> can be:
    all
    all-cicd
    build
    build-full
    clean
    install-cargo-tools
    test
    docs
    check
    check-watch
    clippy
    clippy-watch
    serve-docs
    upgrade-deps
    rustfmt
    help

For example:

Each crate that's contained in this workspace may also have its own nushell script that is also named run. This is a convention that is used in this workspace. You can run the run script in each of the crates to get a list of commands that are specific to that crate.

Star History

Star History Chart

Archive

As this repo grows, changes, and matures, pruning is necessary. The r3bl-open-core-archive is where all the code and artifacts that are no longer needed are moved to.

This way nothing is "lost" and if you need to use some of the code that was removed, you can find it there.

Also if you want to make changes to this code and maintain it yourself, please let us know.

  1. You can submit PRs and we can also accept them, and publish them to crates.io if that makes sense.
  2. Or we can even work out and arrangements to move ownership of the code & crate to you if you would like to commit to maintaining it.