{"slug": "omnidiff-0-3-0-rust-diff-tool-that-understands-your-code", "title": "OmniDiff 0.3.0: Rust Diff Tool That Understands Your Code", "summary": "OmniDiff 0.3.0, a Rust-based git difftool replacement that diffs code by syntax tree using tree-sitter and the APTED tree-diff algorithm, was released this week with embedded language support for shell inside YAML blocks, CSS and HTML inside template literals, TSX inside JSON fields, and Tailwind/clsx class lists in JSX. Against a labeled corpus of real-world diffs, OmniDiff reports 90% of changes completely correct versus 64% for Difftastic, with a median diff time of 4.2ms and a slowest file at 803ms versus Difftastic's 2000ms+. Version 0.3.0 also adds binary file diffing for archives, fonts, PDFs and images, and ships a 22% average performance improvement with 22–43% gains on large files.", "body_md": "Your AI coding assistant just rewrote three functions, added a formatting pass, and touched 15 files. `git diff` shows 400 changed lines. None of them tell you what actually changed. **OmniDiff 0.3.0**, released this week, is a Rust-based `git difftool` replacement that diffs code by its syntax tree rather than line count — and version 0.3.0 adds the feature developers have been asking for: embedded language support.\n\n## How It Works\n\nOmniDiff parses both versions of a file with [tree-sitter](https://tree-sitter.github.io/tree-sitter/) (25 languages supported) and runs the APTED tree-diff algorithm on the resulting ASTs. The result: a reformatted function shows as “moved,” not deleted and re-added. A variable rename shows as an update, not 40 changed lines. When a file has an unknown extension, OmniDiff falls back to plain line diffs — so it never breaks your workflow.\n\nThe accuracy difference versus legacy tools is not marginal. Against a labeled corpus of real-world diffs, OmniDiff gets 90% of changes completely correct. [Difftastic](https://difftastic.wilfred.me.uk/), the previous best-in-class structural diff tool, lands at 64% on the same benchmark. OmniDiff is also faster at worst-case: its slowest file clocks 803ms vs Difftastic’s 2000ms+. Median diff time is 4.2ms.\n\n## What’s New in 0.3.0: Embedded Language Diffing\n\nThe 0.3.0 release ships one major new capability: OmniDiff now detects when code of a different language is embedded inside a string and diffs each layer separately. Concretely:\n\n- Shell inside YAML `run:` and`script:` blocks (GitHub Actions, GitLab CI, Ansible) is diffed as shell\n- CSS and HTML inside template literals (styled-components, css`` `...` `` , html`` `...` `` ) are diffed as CSS/HTML\n- TSX inside JSON `\"content\"` fields is diffed as TSX\n- Tailwind/clsx class lists in JSX `className` ,`cn()` ,`cva()` ,`twMerge()` — diffed class by class, not as a changed string blob\n\nIf you work with GitHub Actions, Ansible playbooks, or any styled-components codebase, this is a direct quality-of-life upgrade. Version 0.3.0 also ships a 22% performance improvement on average and 22–43% improvement on large files.\n\n## Binary Files, Finally\n\nStandard `git diff` on a binary file prints “Binary files differ” and stops. OmniDiff does not. It diffs:\n\n- **Archives** (zip, jar, tar, gz, xz, bz2) — member by member, with Java .class files decompiled to listings\n- **Fonts** (TTF, OTF, WOFF, WOFF2, EOT) — glyph by glyph\n- **PDFs** — page by page, with changed region descriptions\n- **Images** — pixel-aware diff with a change description\n\nDesign tokens, bundled fonts, exported PDFs — these live in git repositories. Knowing what actually changed in a font file or a bundled archive matters, and OmniDiff is currently the only `git difftool` that provides it.\n\n## Installing and Configuring\n\nOmniDiff installs from crates.io:\n\n```\ncargo install --locked omnidiff\n```\n\nThen run the interactive setup wizard, which asks whether to configure globally or for the current repo only:\n\n```\nomnidiff git configure\n```\n\nTo use OmniDiff with `git diff` and `git log -p` (not just `git difftool`):\n\n```\nGIT_EXTERNAL_DIFF=omnidiff git diff\nGIT_EXTERNAL_DIFF=omnidiff git log -p\n```\n\nA [VS Code plugin](https://marketplace.visualstudio.com/items?itemName=ivankovic.omnidiff) is also available for in-editor diffs.\n\n## Who Should Switch\n\nIf you are reviewing pull requests that contain AI-generated code, the answer is: everyone. AI coding assistants produce reformats, moves, and rewrites that trip line-based diffs into showing false positives. OmniDiff’s structural approach cuts that noise. It is also the right tool for repos with binary assets — font files, bundled JARs, exported PDFs — where “Binary files differ” tells you nothing.\n\nThe project is [open source on GitHub](https://github.com/ivankovic/omnidiff) under AGPLv3, with a showcase at [ivankovic.github.io/omnidiff/showcase](https://ivankovic.github.io/omnidiff/showcase/). The [Hacker News thread](https://news.ycombinator.com/item?id=50325253) from the Show HN post has 316 points and is worth reading for edge cases and comparisons.", "url": "https://wpnews.pro/news/omnidiff-0-3-0-rust-diff-tool-that-understands-your-code", "canonical_source": "https://byteiota.com/omnidiff-0-3-0-rust-diff-tool-that-understands-your-code/", "published_at": "2026-11-05 01:07:47+00:00", "updated_at": "2026-11-05 01:22:23.705492+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools", "artificial-intelligence"], "entities": ["OmniDiff", "Difftastic", "tree-sitter", "GitHub", "GitLab", "Ansible", "VS Code", "Rust"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/omnidiff-0-3-0-rust-diff-tool-that-understands-your-code", "markdown": "https://wpnews.pro/news/omnidiff-0-3-0-rust-diff-tool-that-understands-your-code.md", "text": "https://wpnews.pro/news/omnidiff-0-3-0-rust-diff-tool-that-understands-your-code.txt", "jsonld": "https://wpnews.pro/news/omnidiff-0-3-0-rust-diff-tool-that-understands-your-code.jsonld"}}