48 releases (21 stable)
Uses new Rust 2024
| new 4.0.1 | Dec 27, 2025 |
|---|---|
| 3.1.0 | Dec 27, 2025 |
| 2.6.4 | Dec 11, 2025 |
| 2.6.0 | Nov 27, 2025 |
| 0.22.2 | Jul 3, 2024 |
#227 in Command-line interface
86 downloads per month
Used in 5 crates
495KB
10K
SLoC
rat-salsa 2
Runs an application event-loop for ratatui and crossterm.
It can
- poll multiple event-sources fairly
- run background tasks in one or more worker threads.
- run background tasks as async tasks.
- define timers.
- work as a message-queue for in-app messages.
- support focus-handling with SalsaContext::focus
- support for an autonomous dialog window stack.
All incoming events are converted to an application defined event-type, and are distributed by calling an event-handler function. This function returns a control-flow which dictates further actions.
Changes
Book
Companion Crates
-
rat-widget widget library. Incorporates everything below, but each crate can be used on its own too.
Foundational crates
- rat-event Defines the primitives for event-handling.
- rat-cursor Defines just one trait to propagate the required screen cursor position.
- rat-focus Focus-handling for widgets.
- rat-reloc Relocate a widgets state after rendering. This is needed to support view-like widgets.
- rat-scrolled Utility widgets for scrolling.
- rat-popup Utility widget to help with popups.
- rat-dialog Stacks windows/dialogs above the main application.
Crates for specific widgets
- rat-ftable table. uses traits to render your data, and renders only the visible cells. this makes rendering effectively O(1) in regard to the number of rows.
- rat-menu Menu widgets.
- rat-text Text/Value input widgets.
- rat-markdown Extension for TextArea for markdown. experimental
And my 10ct on theming.
- rat-theme2 Color-palettes and widget styles.
- rat-theme4
Latest iteration. Move to a map of things.
- better text-color support
- support for deriving themes by modifying existing ones.
Example
The examples directory contains some examples
-
async1.rs: Async tasks.
-
files.rs: Minimal filesystem browser.
-
half_ui.rs: Inline/Fixed UI.
-
inline.rs: Inline UI.
-
life.rs: Game of Life.
-
links.rs: Terminal hyperlinks.
-
logscroll.rs: Logfile view and find.
-
textinput.rs: Example for text input.
-
themes.rs: Theme show-room.
-
todo.rs: Simple todo app.
-
turbo.rs: Reboot Turbo Pascal.
-
ultra.rs: Rat-salsa in less than 100loc.
-
mdedit.rs: Minimal markdown editor.
There are some templates too
- minimal.rs: Minimal application with a menubar and statusbar.
- nominal.rs: Minimal application, but using subcomponents.
- dialog.rs: Minimal application, using dialog windows.

Dependencies
~11–19MB
~366K SLoC