Repository navigation
rich_rust is a Rust library crate. Distribution is via crates.io — this release intentionally carries no binary assets, matching v0.2.1 and v0.2.3.
[dependencies]
rich_rust = "0.2.4"Highlights
Bug Fixes
- Markdown / Syntax unknown-language fenced code blocks (
7aef687):- Recognized common plain-text lexer aliases (
"text","plaintext","plain","txt") inSyntax::renderviasyntect's plain-text syntax definition while preservingSyntaxError::UnknownLanguagefor unrecognized language names. - Hardened
Markdown::render's unknown-language fenced code block fallback so blocks with non-bundled lexers (such astomlortext) render with plain styling instead of silently disappearing when thesyntaxfeature is enabled. - Added unit (
test_render_plain_text_aliases) and end-to-end (test_md_fenced_code_block_unknown_language_fallback) regression tests.
- Recognized common plain-text lexer aliases (
- All-features lints & showcase snapshots (
7aef687):- Fixed
clippy::needless_boolinTracebackunder thebacktracefeature andclippy::assert_is_emptyacross feature-gated unit tests. - Updated
demo_showcasegolden snapshots to reflect current Python Rich parity and restored TOML fenced code blocks.
- Fixed
Security & Dependencies
- Zero security vulnerabilities / zero unsound advisories (
52412f8):pulldown-cmark0.13.4→0.13.6(manifest minimum bumped to0.13.6; resolvesRUSTSEC-2026-0433andRUSTSEC-2026-0414).rustix(transitive)1.1.4→1.1.6(resolvesRUSTSEC-2026-0486).- Upgraded
fancy-regex(0.18→0.20.2),lru(0.18→0.19.1, removingallocator-api2),serial_test(3.5→4.0.1),time(0.3.54→0.3.55), and compatible minor/patch dependencies (backtrace,bitflags,insta,log,proptest,regex,serde_json,smallvec,unicode-width). cargo auditpasses with 0 vulnerabilities and 0 unsound warnings (2 upstream unmaintained transitive warnings remain under latestsyntect 5.3.0:bincode 1.3.3/RUSTSEC-2025-0141,yaml-rust 0.4.5/RUSTSEC-2024-0320).
Performance
- Release profile switched to
opt-level = 3(52412f8):- Switched
[profile.release]fromopt-level = "z"toopt-level = 3(retaininglto = true,codegen-units = 1,panic = "abort",strip = true). - Back-to-back A/B benchmarking across all 38 Criterion benchmarks confirmed 38/38 improved (0 regressions) with ~1.5x–1.9x geometric mean speedup (including 3.6x–7.6x faster 10 KB text wrapping and rendering, 2.1x–2.3x faster cell width calculation, and 1.7x–2.1x faster ANSI style rendering).
- Showcase binary (
demo_showcase --release --features showcase): median wall time reduced -17.6% (1021.4 ms→842.1 ms) for a+1.07 MiBstripped binary size tradeoff (3.81 MiB→4.88 MiB).
- Switched
Verification
cargo fmt --check— passcargo clippy --all-targets --all-features -- -D warnings— passcargo test --all-features --no-fail-fast— 3,895 passed, 0 failed (52 ignored, across 40 test suites includingdemo_showcase_e2e,demo_showcase_snapshots,conformance_python,e2e_markdown, property/fuzz/regression, and doctests)cargo doc --no-deps --all-features(RUSTDOCFLAGS="-D warnings") — passcargo check --no-default-features --all-targets— passcargo audit— 0 vulnerabilities, 0 unsound warningscargo publish --dry-run --locked— pass
Full Changelog: v0.2.3...v0.2.4