mitsuhiko

mitsuhiko/similar

Rust Apache-2.0 Dev Tools

A high level diffing library for rust based on diffs

1.3k stars
49 forks
slow
GitHub +7 / week

1.3k

Stars

49

Forks

5

Open issues

13

Contributors

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.

Dev Tools Library Discovery value: 6/10
Documentation 8/10
Activity 8/10
Community 7/10
Code quality 6/10

Inferred from signals mentioned in the README (tests, CI, type safety) — not a review of the actual code.

Overall score 8/10

AI's overall editorial judgment — not an average of the bars above, can weigh other factors too.

diffing-algorithms text-comparison rust-library snapshot-testing no-std-support
Actively maintained Well documented Niche/specialized use case Production ready
Deep Analysis · Based on README and public signals
6d ago

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.

Origin

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.

Growth

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.

In production

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.

Code analysis
Architecture

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.

Tests

Not documented in README. Examples directory referenced but no test statistics or coverage percentages provided.

Maintenance

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.

Honest verdict

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

Risks
  • 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.
Prediction

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.

0 found this helpful

Newsletter

Get analyses like this every Monday

Free weekly digest of the most interesting open-source discoveries.

Languages

Rust
99.7%
Makefile
0.2%
Shell
0.1%

Information

Language
Rust
License
Apache-2.0
Last updated
2mo ago
Created
67mo ago
Analyzed with
anthropic/claude-haiku-4-5

Stars over time

Loading…

Contributors over time

Top 100 contributors only — repos with more will plateau at 100.

Loading…

Recent releases

No releases published yet.

Similar repos

java-diff-utils

java-diff-utils/java-diff-utils

Java Diff Utils is a mature, open-source library for computing diffs, applying...

1.5k Java Dev Tools
kpdecker

kpdecker/jsdiff

jsdiff is a JavaScript implementation of the Myers diff algorithm for computing...

9.2k JavaScript Dev Tools
Wilfred

Wilfred/difftastic

Difftastic is a structural diff tool that compares files by parsing their...

25.6k Rust Dev Tools
afnanenayet

afnanenayet/diffsitter

diffsitter is a semantic diff tool for source code that compares abstract...

2.4k Rust Dev Tools
dmtrKovalenko

dmtrKovalenko/odiff

ODiff is a high-performance SIMD-optimized image comparison library that...

3.1k Zig
vs. alternatives
difftastic

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

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

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

odiff (3.0k stars) is image diffing in Zig, orthogonal domain. Not directly comparable despite higher star count.