// the find
Wilfred/difftastic
a structural diff that understands syntax 🟥🟩
Difftastic is a structural diff tool written in Rust that parses files with tree-sitter and diffs the resulting syntax tree instead of comparing lines, so reformatting and rewrapped code doesn't show up as noise. It's for anyone reviewing diffs across 30+ languages who's tired of reformat-only commits burying the real change, and it plugs straight into git, mercurial, and jj as a difftool.
It diffs the actual AST via a graph/shortest-path algorithm rather than line-matching with LCS, so it correctly separates 'this line wrapped' from 'this line actually changed' - something line diffs structurally can't do. Falls back to line-oriented diff on parse errors instead of silently producing a wrong structural result, which is the right conservative default. Drop-in git/mercurial/jj integration means no plugin to write or maintain - it just becomes your difftool. Supports merge-conflict-marker diffing (0.50+) and a --check-only fast path for tooling that just needs a changed/unchanged boolean.
The README's own Known Issues section admits it scales poorly on files with many changes and can burn a lot of memory, plus 'regularly has releases that fix crashes' - that's the maintainer telling you it's not rock-solid yet. No patch or merge output by design, so it's view-only; you still need regular diff/git for anything that consumes the output programmatically. It treats all ordering as significant, so reordered-but-equivalent code (e.g. unordered JSON keys, set literals) reads as a change unless you pre-sort inputs yourself. The side-by-side display is flagged by the authors themselves as 'can be confusing,' which matches most structural-diff tools' tendency to get cluttered on deeply nested changes.