A high level diffing library for rust based on diffs
AI Analysis
Similar is a Rust library providing multiple diffing algorithms (Myers', Patience, Hunt-style, Histogram, LCS) and high-level interfaces for text, byte, and sequence comparison at various granularities (line, word, character, grapheme). It serves developers building diff-dependent tools—particularly snapshot testing frameworks like insta—and is not a general-purpose text editor or version control system.
Inferred from signals mentioned in the README (tests, CI, type safety) — not a review of the actual code.
AI's overall editorial judgment — not an average of the bars above, can weigh other factors too.
Rust diffing library with multiple algorithms; library for testing and diffs, not a CLI tool
Similar is a Rust library providing multiple diff algorithms (Myers, patience, histogram, LCS) for arbitrary sequences at line/word/character/grapheme granularity. Built initially for the insta snapshot testing library, it serves as a general-purpose diffing dependency. Adoption appears concentrated in the Rust testing and tooling ecosystem rather than widespread end-user adoption.
Created January 2021, originally inspired by pijul's diff library but evolved significantly. Built specifically to power insta snapshot testing, giving it a clear genesis purpose rather than a general-purpose origin.
Steady growth from 0 to 1,292 stars over ~5 years suggests organic adoption within Rust ecosystem. Recent push May 2026 and modest weekly star gains (10 in last 7 days) indicate active but not accelerating development. Growth likely tied to insta's adoption and Rust ecosystem expansion rather than viral adoption.
Adoption not verified at scale. README explicitly names insta snapshot testing library as primary consumer; similar-asserts library also mentioned as related project. No public case studies, companies, or projects documented beyond the two related insta ecosystem projects. Crates.io download stats accessible but not provided in metadata.
Appears to be modular algorithm-selection library with trait-based diffing on comparable sequences. README shows support for Myers, patience, histogram, and LCS algorithms with line/word/character/grapheme specializations. Likely designed for composability rather than monolithic diff engine. No_std support with alloc indicated via feature flags suggests embedded-friendly design.
Not documented in README. Examples directory referenced but no test statistics or coverage percentages provided.
Last push 2026-05-24 (40 days prior to analysis date) indicates active maintenance. 48 forks and 1,292 stars with 10 stars in last 7 days suggest steady but not explosive ongoing interest. No explicit issue or PR activity visible in metadata, but recent push signals continued development.
ADOPT IF: You need a dependency-free Rust library with multiple configurable diff algorithms (Myers, patience, histogram, LCS) for testing, assertion, or diff-in-process use cases; or you are building on insta ecosystem. AVOID IF: You need a standalone CLI tool for end-user diffing, or require diffing algorithms not listed (structural syntax-aware diffing), or need integration guarantees beyond Apache-2.0 maintenance. MONITOR IF: You are evaluating long-term stability of insta ecosystem or considering similar as a foundation for a larger diffing tool; recent maintenance is steady but growth is modest.
Independent dimensions
Mainstream potential
3/10
Technical importance
7/10
Adoption evidence
3/10
- Adoption concentrated in single primary consumer (insta); loss of insta momentum could reduce maintenance pressure. Adoption beyond insta ecosystem not publicly verified.
- Modest growth rate (10 stars/week, 1.3k total) over 5 years may indicate limited ecosystem reach outside snapshot testing domain. No evidence of enterprise adoption.
- Test coverage not documented; implementation quality cannot be verified from README/metadata alone. LCS and multiple algorithm implementations carry correctness risk if not thoroughly tested.
- No public documentation of known limitations, algorithm complexity tradeoffs, or performance benchmarks relative to competitors. Users must infer behavior from examples.
- Maintenance dependent on single author (mitsuhiko) based on repository structure; bus factor risk if primary maintainer becomes unavailable.
Similar will likely remain a stable, actively maintained library component of the Rust testing ecosystem. Slow organic growth expected unless broader adoption (e.g., in CLI tools or language servers) emerges. Unlikely to become mainstream outside Rust or testing domain.
Newsletter
Get analyses like this every Monday
Free weekly digest of the most interesting open-source discoveries.
Languages
Information
- Website
- https://insta.rs/similar
- Language
- Rust
- License
- Apache-2.0
- Last updated
- 2mo ago
- Created
- 67mo ago
- Analyzed with
- anthropic/claude-haiku-4-5
Stars over time
Contributors over time
Top 100 contributors only — repos with more will plateau at 100.
Open issues
[feature request] an option to ignore indentation / whitespace changes in `diff_lines`
Gallery for outputs of examples
[Question] How can I *squash* two diff?
Support for `Bytes` from `bytes` crate
Support custom comparison with capture_diff_slices_by
Open pull requests
No open pull requests.
Recent releases
No releases published yet.
Similar repos
java-diff-utils/java-diff-utils
Java Diff Utils is a mature, open-source library for computing diffs, applying...
| Repository | Stars | Week Δ | Language | Score | Updated |
|---|---|---|---|---|---|
|
|
1.3k | +7 | Rust | 8/10 | 2mo ago |
|
|
1.5k | — | Java | 7/10 | 6d ago |
|
|
9.2k | — | JavaScript | 8/10 | 1mo ago |
|
|
25.6k | — | Rust | 8/10 | 2d ago |
|
|
2.4k | — | Rust | 7/10 | 1d ago |
|
|
3.1k | — | Zig | 8/10 | 4w ago |
Difftastic (25.5k stars) is a complete structural diff CLI tool for multiple syntaxes; similar is a library providing algorithm primitives. Difftastic likely uses similar or similar algorithms but targets end-user experience. Different categories (tool vs. library).
jsdiff (9.1k stars) is JavaScript-focused and serves similar algorithmic purpose but in different language/ecosystem. Orders of magnitude larger star count may reflect JavaScript's broader user base rather than technical superiority.
diffsitter (2.3k stars) is a Rust structural diff tool; similar is lower-level algorithm library. Similar appears to serve library consumers; diffsitter targets users wanting syntax-aware diffing output.
odiff (3.0k stars) is image diffing in Zig, orthogonal domain. Not directly comparable despite higher star count.
