v0.1.0 · framework complete62 tests green

Terminal apps that ship
like web apps.

An open-source application framework for Rust terminal UIs. You declare routes and views — Veloce owns the event loop, the flexbox math, and the terminal itself.

Veloce showcase: live frame timings, layout-cache switch, and panic recovery
15-second demo — live frame stats, cache on/off, panic restores the terminal
$cargo add veloce-tui
62 tests green · clippy clean · fmt clean
Proven crates. Nothing rented.

Route like Remix. Own the terminal.

A stack router, a view lifecycle, and a layout engine. One framework, three verbs that compose.

Route

Router · Shells · Modals

Push, pop, and replace over a route table. Persistent chrome survives navigation; modals render over the previous route with a backdrop and locked focus.

$ cargo run -p veloce-tui --example reference_app
✓ hydrated in 1 frame
✓ deploy streamed → Live
✓ terminal restored on quit

Render

taffy · cells · 60 FPS

Declare flex containers; taffy computes continuous layout and the quantization engine snaps it to cells — no overlaps, no drift, no zero-width collapses.

Flex
Text
ScrollView
Modal

Restore

Guard · Panics · Signals

Every panic, SIGINT, and SIGTERM restores raw mode, the alt screen, and mouse capture before exit. Logs go to a file, never the live screen.

Service: auth-service-v2   Status: Live
pod log line 0
pod log line 1
pod log line 2   █

Set up once, in your crate

veloce-tui = "0.1" impl View VeloceApp::run

Stack router

Push, pop, replace. The root cannot be popped; navigating away mid-load cancels the task.

Router

Async hydration

Declare load(); the framework shows your fallback and hydrates without flicker.

View

Flexbox layout

taffy computes; the grid engine quantizes. Siblings never overlap, even at 1×7.

Layout

TextInput

Char-indexed cursor, insert and backspace, Unicode-aware. Tab moves focus in forms.

Primitive

ScrollView

Offset slicing with a stable scrollbar. Streams thousands of log lines per frame budget.

Primitive

Modal overlays

Centered over the previous route with a dimmed backdrop and locked input focus.

PrimitiveRouter

Declarative macros

flex_row! expands to exactly the builder tree — proven by test.

Macro

Measured perf

Cold boot, RSS, key latency, and frame cost — criterion benches against recorded baselines.

Bench

User docs

Quickstart to benchmarks on the Blume docs site — usage only, no process paperwork.

Docs

Your app. Your runtime. Your frame budget.

Three isolated tiers. Heavy async work or a resize never causes a frame drop or input lag.

What you end up with

VeloceAppone run() call owns it all
Tokio poolloaders and cx.spawn tasks
Taffy layoutflexbox snapped to cells
Ratatui bufferpure render, ≤60 FPS flush
Crossterm inputtyped events, bounded channel

How you get there

01
Dependveloce-tui = "0.1" on stable Rust
02
Declareone View: load, update, view
03
Route itVeloceApp::new().route("/", view)
04
Run it.run().await — q quits cleanly

Three steps from install to first frame.

01

Step 1: Depend

Add veloce-tui = "0.1" to Cargo.toml. Stable toolchain, no nightly features.

02

Step 2: Declare

Implement View for one struct with flexbox children. State stays yours.

03

Step 3: Run

VeloceApp::new().route("/", view).run().await Press q to quit; the terminal is restored.

Built in the open.
Proven, not asserted.

Veloce is built in the open by RavaniRoshan — a Rust terminal-UI framework where every claim ships with a test or a measured probe. No lock-in, no telemetry, no rented runtime.

github.com/RavaniRoshan/veloce

Free forever because it's open.

No sponsors, no paywall — just proven crates, tests, and docs.

tokio1.53.2
taffy0.8.3
ratatui0.29.0
crossterm0.28.1
crossbeam-channel0.5.17
async-trait0.1.92
Star on GitHub→ Read the docs→

Start building. Pay nothing.

The framework is free. You cover your own terminal.

Run it

The whole framework, in your crate.

$0 forever
Quickstart
  • Router, views, layout, runtime
  • Text, TextInput, ScrollView, Modal
  • Three runnable examples
  • Panic-safe terminal, always restored
  • Issues and PRs welcome on GitHub

Learn it

Usage docs, quickstart to benchmarks.

Docs Blume site
Open the docs site
  • Views, actions, and Context
  • Flexbox layout on a cell grid
  • Routing, modals, and focus
  • Measured benchmarks, honestly caveated

Veloce is free. You cover your own machine.
Questions? Open an issue → github.com/RavaniRoshan/veloce

Measured, not asserted.

Linux x86_64, criterion + process probes. Budgets from the spec, numbers from the machine.

3.55ms

Cold boot to first frame. Budget: 15 ms.

4 MiB

Idle RSS after boot. Budget: 12 MiB.

10 µs

Key-echo p95 under 1,000 actions/sec.

Honest caveat: repeated frames reuse the last layout tree: 94 µs at 10 children, 160 µs at 2,000. A cold frame after a change still pays full layout, 180 µs to 2.25 ms.

Questions people ask before writing an event loop.

Do I write my own event loop?+

No. VeloceApp::run owns the ingestion thread, the Tokio runtime, the priority drain, and the 60 FPS flush. You implement View and declare routes.

How do background tasks update the UI?+

Through cx.dispatcher() — a cloneable typed sink. Move it into any future; dispatched actions land in update() on the UI thread. No locks, no channels in user code.

How does flexbox work on a cell grid?+

taffy computes continuous layout; quantize_rect rounds absolute edges once, clamps every child inside its parent, and forces a 1-cell minimum when taffy assigned a positive size. Text participates via a measure function, so wrapping is layout-aware.

What happens when my view panics?+

A panic hook restores raw mode, leaves the alt screen, and disables mouse capture before the default hook prints the backtrace. Proven on a real PTY for panics inside both view() and update().

How do I handle keyboard input?+

Implement handle_key on your view — it runs before any global routing. Return true to consume the event. q is reserved as the global quit key by VeloceApp::run.

Does it work on macOS and Windows?+

Linux x86_64 is verified here (build + PTY e2e). macOS and Windows via WSL/Windows Terminal use the same portable crossterm/ratatui paths but are not verified in this environment.

Is it on crates.io?+

Not yet — publishing needs the owner's token. File manifests are package-validated; releases will go leaf-crate first.

What is intentionally out of scope?+

Hot-reload/dev-server, mouse-wheel scrolling, and non-terminal backends. The docs site keeps the full deferred list.

Stop plumbing your event loop.

Declare one view, run it, press q to quit.