Skip to main content

Crate phenotype_patch

Crate phenotype_patch 

Source
Expand description

Phenotype library

§patch

Unified diff and patch library for Rust. Parse, create, and apply patches.

§Features

  • Parse: Unified, context, and side-by-side diffs
  • Create: Generate diffs from text or structured data
  • Apply: Apply patches with conflict detection
  • Merge: Three-way merge with conflict markers

§Installation

[dependencies]
patch = { git = "https://github.com/KooshaPari/patch" }

§Usage

use patch::{diff, apply};

let old = "hello world";
let new = "hello rust";

let diff = diff(old, new)?;
apply(old, &diff)?;

§License

MIT

Modules§

core
Core functionality