osteak
Elm Architecture for ratatui. We built this because our TUI kept accumulating state bugs as it grew — booleans disagreeing, async tasks outliving the UI state that spawned them, the usual. TEA fixed it for us. Maybe it helps you too.
You bring the event loop. osteak gives you update, view, and
a Cmd type to describe side effects. There's an optional runner
if you don't have a loop yet.
Quick Start
use ;
use Frame;
use Paragraph;
With the built-in runner
# use ;
# use Frame;
# use Paragraph;
#
#
#
use ;
async
Without the runner
Write your own loop — osteak doesn't take control.
See examples/counter_manual.rs.
Architecture
┌──────────────────────┐
│ Your Event Loop │
│ (or osteak::runner) │
└──────┬───────────────┘
│ Msg
┌──────▼───────────────┐
│ Tea::update(&mut) │
│ → Cmd { action, │
│ dirty } │
└──────┬───────────────┘
│
┌────────┼────────┐
│ │ │
Task None Quit
(you spawn)
│
│ Msg (on completion)
└──────► back to update
Features
| Feature | Default | Description |
|---|---|---|
crossterm-backend |
yes | Crossterm backend + EventStream |
tokio-runtime |
yes | Tokio integration for the runner |
Just the traits, no runtime:
Examples
counter— with the runnercounter_manual— hand-written event loopasync_tasks—Cmd::task+tokio::spawnmulti_pane— composition withCmd::map
MSRV
1.86.0 (same as ratatui 0.30).