# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2021"
name = "mpatch"
version = "1.5.0"
authors = ["Romelium <author@romelium.com>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A smart, context-aware patch tool that applies diffs using fuzzy matching, ideal for AI-generated code."
readme = "README.md"
keywords = [
    "patch",
    "diff",
    "cli",
    "fuzzy",
    "llm",
]
categories = [
    "command-line-utilities",
    "development-tools",
]
license = "MIT"
repository = "https://github.com/romelium/mpatch"

[[package.metadata.release.pre-release-replacements]]
file = "CHANGELOG.md"
search = '## \[Unreleased\]'
replace = """
## [Unreleased]

## [{{version}}] - {{date}}"""

[[package.metadata.release.pre-release-replacements]]
file = "src/lib.rs"
search = 'mpatch = "[0-9.]+"'
replace = 'mpatch = "{{version}}"'
min = 0

[[package.metadata.release.pre-release-replacements]]
file = "src/lib.rs"
search = 'version = "[0-9.]+"'
replace = 'version = "{{version}}"'
min = 0

[[package.metadata.release.pre-release-replacements]]
file = "README.md"
search = 'mpatch = "[0-9.]+"'
replace = 'mpatch = "{{version}}"'
min = 0

[[package.metadata.release.pre-release-replacements]]
file = "README.md"
search = 'version = "[0-9.]+"'
replace = 'version = "{{version}}"'
min = 0

[[package.metadata.release.pre-release-replacements]]
file = "README.md"
search = 'mpatch-x86_64-unknown-linux-gnu-v[0-9.]+\.tar\.gz'
replace = "mpatch-x86_64-unknown-linux-gnu-v{{version}}.tar.gz"
min = 0

[features]
clipboard = ["dep:arboard"]
default = [
    "parallel",
    "clipboard",
]
parallel = ["dep:rayon"]

[lib]
name = "mpatch"
path = "src/lib.rs"

[[bin]]
name = "mpatch"
path = "src/main.rs"

[[test]]
name = "patch_apply_tests"
path = "tests/patch_apply_tests.rs"

[[bench]]
name = "mpatch_bench"
path = "benches/mpatch_bench.rs"
harness = false

[dependencies.anyhow]
version = "1.0.100"

[dependencies.arboard]
version = "3.6.1"
optional = true

[dependencies.clap]
version = "4.5.53"
features = ["derive"]

[dependencies.colored]
version = "2.2.0"

[dependencies.env_logger]
version = "0.11.8"

[dependencies.log]
version = "0.4.28"

[dependencies.rayon]
version = "1.11.0"
optional = true

[dependencies.similar]
version = "2.7.0"

[dependencies.thiserror]
version = "1.0.69"

[dev-dependencies.criterion]
version = "0.5.1"
features = ["html_reports"]

[dev-dependencies.indoc]
version = "2.0.7"

[dev-dependencies.tempfile]
version = "3.23.0"

[profile.release]
lto = true
codegen-units = 1
panic = "abort"
strip = true
