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.
cargo add veloce-tuiRoute like Remix. Own the terminal.
A stack router, a view lifecycle, and a layout engine. One framework, three verbs that compose.
Route
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
Declare flex containers; taffy computes continuous layout and the quantization engine snaps it to cells — no overlaps, no drift, no zero-width collapses.
Restore
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
Stack router
Push, pop, replace. The root cannot be popped; navigating away mid-load cancels the task.
Async hydration
Declare load(); the framework shows your fallback and hydrates without flicker.
Flexbox layout
taffy computes; the grid engine quantizes. Siblings never overlap, even at 1×7.
TextInput
Char-indexed cursor, insert and backspace, Unicode-aware. Tab moves focus in forms.
ScrollView
Offset slicing with a stable scrollbar. Streams thousands of log lines per frame budget.
Modal overlays
Centered over the previous route with a dimmed backdrop and locked input focus.
Declarative macros
flex_row! expands to exactly the builder tree — proven by test.
Measured perf
Cold boot, RSS, key latency, and frame cost — criterion benches against recorded baselines.
User docs
Quickstart to benchmarks on the Blume docs site — usage only, no process paperwork.
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
How you get there
Three steps from install to first frame.
Step 1: Depend
Add veloce-tui = "0.1" to Cargo.toml. Stable toolchain, no nightly features.
Step 2: Declare
Implement View for one struct with flexbox children. State stays yours.
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.
Free forever because it's open.
No sponsors, no paywall — just proven crates, tests, and docs.
Start building. Pay nothing.
The framework is free. You cover your own terminal.
Run it
The whole framework, in your crate.
- 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.
- 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.
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.