| Crates.io | flickzeug |
| lib.rs | flickzeug |
| version | 0.4.5 |
| created_at | 2025-12-17 14:21:10.44824+00 |
| updated_at | 2026-01-15 17:15:15.460904+00 |
| description | A fork of diffy: diff, patch, and merge library featuring Myers' algorithm, unified diff format parsing, fuzzy patch application, and three-way merge with conflict detection |
| homepage | |
| repository | https://github.com/prefix-dev/flickzeug |
| max_upload_size | |
| id | 1990371 |
| size | 597,092 |
A Rust library for computing diffs, parsing and applying patches, and performing three-way merges.
Note: This is a fork of diffy maintained by prefix.dev.
git diff, diff -u, etc.)*_bytes variants for working with non-UTF-8 contentAdd flickzeug to your Cargo.toml:
[dependencies]
flickzeug = "0.4"
use flickzeug::create_patch;
let original = "The quick brown fox\njumps over\nthe lazy dog.\n";
let modified = "The quick brown cat\njumps over\nthe sleepy dog.\n";
let patch = create_patch(original, modified);
println!("{}", patch);
use flickzeug::{apply, Patch};
let original = "The quick brown fox\njumps over\nthe lazy dog.\n";
let patch_text = "..."; // unified diff format
let patch = Patch::from_str(patch_text).unwrap();
let result = apply(original, &patch).unwrap();
use flickzeug::merge;
let base = "line1\nline2\nline3\n";
let ours = "line1\nmodified by us\nline3\n";
let theirs = "line1\nline2\nline3 changed\n";
let merged = merge(base, ours, theirs).unwrap();
This project is available under the terms of either the Apache 2.0 license or the MIT license.
This project is a fork of diffy by Brandon Williams. We thank the original author for their excellent work.