[package]
name = "anyrepair"
version = "0.2.1"
edition = "2024"
authors = ["Ying Kit WONG"]
description = "A comprehensive Rust crate for repairing malformed structured data including JSON, YAML, XML, TOML, CSV, INI, Markdown, and Diff with format auto-detection"
license = "Apache-2.0"
repository = "https://github.com/yingkitw/anyrepair"
homepage = "https://github.com/yingkitw/anyrepair"
documentation = "https://docs.rs/anyrepair"
readme = "README.md"
keywords = ["repair", "json", "yaml", "parser", "mcp"]
categories = ["text-processing", "parser-implementations", "development-tools"]

[dependencies]
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_yaml = "0.9"
pulldown-cmark = "0.10"
regex = "1.10"
thiserror = "1.0"
anyhow = "1.0"
clap = { version = "4.4", features = ["derive"] }
quick-xml = "0.36"
toml = "0.8"
csv = "1.3"
ini = "1.3"
rmcp = "0.14"

[dev-dependencies]
criterion = "0.5"
tempfile = "3.25"
arbitrary = "1.4"
proptest = "1.4"

[[bench]]
name = "repair_benchmarks"
harness = false


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

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

[[bin]]
name = "anyrepair-mcp"
path = "src/bin/mcp_server.rs"

# Release profile optimizations for smaller binary size
[profile.release]
opt-level = "z"           # Optimize for size
lto = true                # Enable Link Time Optimization
codegen-units = 1         # Single codegen unit for better optimization
strip = true              # Strip symbols from binary
panic = "abort"           # Abort on panic (smaller binary)

# Optimized profile for distribution
[profile.dist]
inherits = "release"
opt-level = "z"
lto = "fat"
codegen-units = 1
strip = true
panic = "abort"
