Sigil

Diff

A rendered unified diff of text or a parsed Patch.

A signal or closure source renders the rows again when it changes. Rows render through virtual_list, so a long patch builds only the visible rows. Code is colored by the language of the file path. With select, a click on a hunk header selects the hunk and a click or Shift+click selects changed lines, for staging.

GUITUIRuns in the browserdiff

Preview

Diff, Default, light themeDiff, Default, dark theme

Usage example

fn diff_demo() -> DiffBuilder {    diff(PATCH)        .path("src/app.rs")        .view(DiffView::Unified)        .max_rows(24)}

API

NameSignaturePurpose
diff`fn diff(patch: impl DiffSource + 'static) -> DiffBuilder`; `.select(Signal<Selection>)`A rendered unified diff of text or a parsed Patch. A signal or closure source renders the rows again when it changes. Rows render through virtual_list, so a long patch builds only the visible rows. Code is colored by the language of the file path. With select, a click on a hunk header selects the hunk and a click or Shift+click selects changed lines, for staging.