Skip to content

rs-rich

CI crates.io docs.rs MSRV License GitHub

A Rust port of Python's rich — rich text, colour, tables, markdown and progress bars in the terminal — plus a port of the rich-cli tool.

Markup

Renderings on this site come from the library or CLI itself. SVG exports and browser screenshots are committed snapshots of actual output.


Preparing 0.0.4

0.0.4 release preparation brings together explicit text encoding, GIF half-block rendering and measured CSV/wrapping improvements plus an optional syntax cache. The selected changes are integrated; publication still requires the protected release workflow. 0.0.4 is not published. The latest published release remains 0.0.3.

What changed in 0.0.3

Graphical diff exports retain color with redirected stdout; notebooks support panels and alignment; styled titles render correctly; Windows paging uses more.com. JSON precision and GIF/CSV redirection also improve.

Read the 0.0.3 release notes for actual CLI screenshots, per-package changes and remaining limitations. Package badges below show what is currently available on crates.io.

What it does

  • Console markup

    [bold red]text[/] — nested tags, themes, emoji shortcodes, and automatic highlighting of numbers, paths, URLs and booleans.

  • Layout

    Tables, panels, trees, columns, rules, alignment and padding, all of which measure and wrap correctly against terminal cell widths.

  • Documents

    Markdown, JSON and syntax-highlighted source, rendered to the terminal.

  • Live output

    Progress bars, spinners and status displays that refresh in place.

Byte-parity with Python rich

This is a port, not a re-imagining. The promise is that output is byte-identical to Python rich 15.0.0 for everything implemented — enforced by golden fixtures captured from the real library and asserted in CI.

That promise is why the honest bits matter:

Early releases with independent crate versions

The API takes breaking changes regularly, and the port is deliberately incomplete. What is implemented is parity-tested; what isn't is listed plainly in Module status, and what deliberately differs is in Divergences — most notably syntax highlighting, which uses syntect rather than Pygments and is therefore not byte-identical.

Released crates

The badges below show the versions currently available on crates.io.

crate version docs what it is
rs-rich rs-rich docs.rs the library — use rich::…
rs-rich-cli rs-rich-cli the rich command
rs-rich-ext rs-rich-ext docs.rs extensions + plugin registry
rs-rich-art rs-rich-art docs.rs FIGlet text, image→ASCII, GIFs

Versions prepared in this checkout

These manifest versions describe the source tree, not publication status. Each crate versions independently; see Branching and releases.

Package Manifest version
rs-rich 0.0.4
rs-rich-ext 0.0.4
rs-rich-cli 0.0.4
rs-rich-art 0.0.4

Install

cargo add rs-rich

The package is rs-rich because rich was taken on crates.io. The library target keeps the short name, so you write:

use rich::{Console, Table};
cargo install rs-rich-cli

Installs a binary called rich.

A first look

use rich::Console;

let console = Console::new();
console.print_str("[bold magenta]Hello[/] [green]World[/] — 42");

Then read the tutorial, or skim the gallery to see what is available.