Any input
Compare two strings, parse unified or multi-file Git patches, or supply structured files and hunks. See Choose an input.

[dependencies]ratatui-diff = "0.1"Any input
Compare two strings, parse unified or multi-file Git patches, or supply structured files and hunks. See Choose an input.
Unified or split
Switch layouts without losing your place. Wrap long lines, show whitespace, hide numbers, and choose a theme. See Appearance.
Built for review
Jump by hunk or file, search source, fold files and unchanged context, and keep the current file header visible. See Navigation and Folding.
Exact source
Selection copies the original bytes, never gutters or padding. Hit-testing maps terminal cells back to file, side, line, and byte. See Selection.
Optional syntax colors
Enable the syntax feature for bundled grammars and themes, composed underneath diff styling.
See Syntax colors.
You own the app
Rendering depends only on ratatui-core. Your application keeps terminal setup, key bindings,
files, and repository access.
The bundled viewer example cycles through unified view, split view, and visible whitespace. Run it
with cargo run --example viewer.
