r3bl-org/r3bl-open-core

TUI framework and developer productivity apps in Rust 🦀

What it solves

Existing terminal user interface (TUI) libraries often rely on blocking operations, suffer from screen flickering, or have limited control over terminal behavior. r3bl-open-core provides a high-performance, purely asynchronous framework for building modern CLI and TUI applications in Rust that avoid blocking the main thread and work seamlessly across Linux, macOS, and Windows.

How it works

The project implements an immediate mode reactive UI where every state change triggers a render from scratch, separating rendering from state mutation. It utilizes a double-buffered compositor to paint only diffs, optimizing performance and reducing flicker. The framework is built on several core primitives:

  • Async Readline: A non-blocking, interruptible implementation of line input.
  • Applets: A state management system allowing processes to persist and share state across their lifecycle.
  • FlexBox & CSS-like Styling: A declarative layout engine and styling system inspired by modern web development (React, JSX, CSS).
  • TUI Modes: Supports "Full TUI" (raw mode, alternate screen), "Partial TUI" (interactive selections and async REPLs), and terminal multiplexing via PTYs.

Who it’s for

Rust developers who want to build immersive, responsive, and complex terminal applications—ranging from simple interactive prompts to full-screen productivity tools—without the limitations of traditional blocking TUI libraries.

Highlights

  • Purely Async: Built on Tokio to ensure the main event loop and all operations are non-blocking.
  • Web-inspired Ergonomics: Brings FlexBox and CSS-like declarative layouts to the terminal.
  • Cross-Platform: Native support for Windows, macOS, and Linux, including optimizations for SSH connections.
  • Rich Component Library: Includes a Markdown parser with syntax highlighting, rich text editors, and dialog boxes.
  • Integrated Apps: Includes edi (a Markdown editor) and giti (interactive git workflows) as reference implementations.

Related

  • Project
  • Project
  • Project
  • Project
  • Project