Crate zenpatch

Source
Expand description

A crate for applying text-based patches.

This crate provides a single primary function, apply, which takes a patch and the original content as string slices and returns the patched content. It is designed for simplicity and robustness, especially for use by AI agents.

Re-exports§

pub use apply::apply;
pub use error::ZenpatchError;
pub use vfs::Vfs;
pub use get_llm_instructions::get_llm_instructions;

Modules§

applier
Contains the logic for applying a parsed patch to file content.
apply
Implements the main apply function for the zenpatch crate.
data
Contains all data structures used for representing patches and their components.
error
Defines the ZenpatchError enum for patch parsing and application errors.
get_llm_instructions
Provides a function to retrieve the LLM-facing patch format documentation.
parser
vfs
Defines the Virtual File System (VFS) type alias.