gilt
Rich terminal formatting for Rust — a port of Python's rich library.
Beautiful terminal output for Rust: styles, tables, trees, syntax highlighting, progress bars, live displays, markdown rendering, and more — all rendered as ANSI escape sequences.
Quick start
[]
= "0.13"
use *;
Features
Core widgets
Text · Table · Panel · Tree · Columns · Layout · Padding · Align · Group
Terminal features
Syntax (150+ languages) · Markdown · Json · Progress (multi-bar with ETA, speed, spinner) · Live (in-place updates) · Status
Rust-native extensions
Gradient · Sparkline · Canvas (Braille drawing) · Diff (unified + side-by-side) · Figlet · CsvTable · Stylize trait ("hi".bold().red()) · iterator .progress() · Inspect (any Debug value) · environment detection (NO_COLOR, FORCE_COLOR, CLICOLOR) · WCAG 2.1 contrast checking · extended underlines (curly, dotted, dashed, double) · bidirectional anstyle interop
Derive macros (feature-gated)
use ;
Auto-generate widget conversions from struct definitions. See crates/gilt-derive/README.md.
Optional integrations
miette · eyre · tracing · anstyle
Documentation
| Resource | Where |
|---|---|
| API docs | docs.rs/gilt |
| Release notes & migration | CHANGELOG.md |
| Derive macros | crates/gilt-derive/ · docs.rs/gilt-derive |
| Examples (104 of them) | examples/ — run any with cargo run --example <name> |
| Feature flags & deps | docs.rs/crate/gilt/latest/features |
Examples
Performance
cargo bench runs the criterion suite (~80 benchmarks). See CHANGELOG.md for v0.10.x → v0.11.0 perf wins (T8 lock-free Live +21,000×, table render -46%, etc.).
Minimum Supported Rust Version
1.82.0 (for std::sync::LazyLock).
License
MIT — see LICENSE.