# mitsuhiko/similar

A high level diffing library for rust based on diffs

Repository: https://github.com/mitsuhiko/similar
Canonical: https://ross.abutalabs.com/products/similar
Homepage: https://insta.rs/similar
Language: Rust
License: Apache-2.0
License Family: permissive
Topics: diff, unified-diff, patch, rust
Last push: 2026-08-17T09:44:43+00:00

## Health v2 (maintenance only)
Score: 76/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 98, release rhythm 35, longevity 100
- inputs: {"age_days": 2054, "days_push": 16, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1311, forks 54 (observed 2026-08-28T04:04:20.019275+00:00)

## What it is
Similar is a dependency-free Rust crate implementing multiple diffing algorithms (Myers, patience, histogram, LCS) with high-level interfaces for text, byte, and arbitrary sequence diffing. It supports unified diff generation, line/word/character-level diffing, and structured three-way merging with diff3 conflict output.

## Use cases
- compute diffs between two texts in Rust
- generate unified diff output for patches
- diff files line by line or word by word
- perform three-way merges with conflict markers
- compare arbitrary sequences of comparable items
- build snapshot testing tools with diff output
- use a diff library in no_std embedded Rust

## When to choose
- you need a pure-Rust, dependency-free diffing library
- you want multiple diff algorithms to choose from
- you need unified diff or diff3 merge output
- you target no_std environments

## When to avoid
- you need a command-line diff tool rather than a library
- you work outside the Rust ecosystem
- you need binary file diffing beyond byte-level comparison

## Facets
- artifact type: library
- maturity: stable
- function: parser, developer-tools
- domain: developer-tools, text-editors, version-control
- platform: rust, cross-platform
- tags: diff, unified-diff, patience-diff, myers-diff, three-way-merge, no-std, snapshot-testing

## Member repositories
- mitsuhiko/similar (main) score 76

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:20.019275+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:49:50.889196+00:00, confidence not recorded.
  - readme: https://github.com/mitsuhiko/similar (fetched 2026-08-28T04:04:20.019275+00:00, sha 20cf290fbfc5)
  - homepage: https://insta.rs/similar (fetched 2026-08-29T12:07:48.420095+00:00, sha 547ba3730c74)
  - site_page: https://insta.rs/docs (fetched 2026-08-29T12:07:48.429744+00:00, sha 4bcfa7bd8385)
  - registry_crates: https://crates.io/api/v1/crates/similar (fetched 2026-08-29T12:07:48.436540+00:00, sha ea16c9fccf7b)
  - site_page: https://insta.rs/changelog (fetched 2026-08-29T12:07:48.433095+00:00, sha 90e458d9f485)
- Data as of 2026-08-30T08:39:29.467469+00:00.
