https://github.com/surrealdb/dmp
An efficient plain text comparison and patching library written in Rust
https://github.com/surrealdb/dmp
diff diffing diffmatchpatch rust text-comparison text-diff
Last synced: 7 months ago
JSON representation
An efficient plain text comparison and patching library written in Rust
- Host: GitHub
- URL: https://github.com/surrealdb/dmp
- Owner: surrealdb
- License: mit
- Created: 2022-01-22T10:26:47.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2025-04-09T11:00:57.000Z (10 months ago)
- Last Synced: 2025-06-30T07:19:05.428Z (7 months ago)
- Topics: diff, diffing, diffmatchpatch, rust, text-comparison, text-diff
- Language: Rust
- Homepage: https://docs.rs/dmp
- Size: 43 KB
- Stars: 18
- Watchers: 11
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# dmp
The Diff Match and Patch libraries offer robust algorithms to perform the operations required for synchronising plain text. This repository contains a Rust version of the original [diff-match-patch](https://github.com/google/diff-match-patch) library, using up-to-date crate packages.
[](https://github.com/surrealdb/dmp) [](https://docs.rs/dmp/) [](https://crates.io/crates/dmp) [](https://github.com/surrealdb/dmp)
#### Features
- Diffing and patching library for plain text
- Retrieve differences between two blocks of text
- Create a set of patches for converting a block of text into another
- Apply a set of patches onto a block of text to convert it to another block of text
- Uses best-effort to apply patch even when the underlying text doesn't fully match.
#### Fuzzing
A fuzzer is provided as a sanity-check:
```console
RUST_BACKTRACE=1 cargo fuzz run fuzz
```
#### Original
This code is forked originally from [diff_match_patch.rs](https://crates.io/crates/diff_match_patch), licensed under the [MIT](https://choosealicense.com/licenses/mit/) license.