[package]
name = "imgfprint"
version = "0.4.3"
edition = "2021"
description = "High-performance, deterministic image fingerprinting library"
license = "MIT"
keywords = ["image", "fingerprint", "perceptual-hash", "semantic", "deduplication"]
categories = ["multimedia::images", "algorithms"]
documentation = "https://docs.rs/imgfprint"
rust-version = "1.70"
repository = "https://github.com/themankindproject/imgfprint-rs"
readme = "README.md"
exclude      = [
    ".github/**",
    "benches/**",
    "examples/**",
    "tests/**",
    "fuzz/**",
    "*.sh",
]

[dependencies]
image = { version = "0.25", default-features = false, features = ["png", "jpeg", "gif", "webp", "bmp"] }
exif = { package = "kamadak-exif", version = "0.6" }
fast_image_resize = { version = "6.0", features = ["image"] }
blake3 = "1.8"
realfft = "3.4"
rustfft = "6.2"
thiserror = "2.0"
serde = { version = "1.0", features = ["derive"], optional = true }
rayon = { version = "1.10", optional = true }
tract-onnx = { version = "0.22.1", optional = true }
tracing = { version = "0.1", optional = true }
subtle = "2.6"
bytemuck = { version = "1.18", features = ["derive"] }
rand_chacha = { version = "0.3.1", optional = true }
rand_core = { version = "0.6.4", optional = true }
hmac = { version = "0.12.1", optional = true }
sha2 = { version = "0.10.8", optional = true }

[features]
default = ["serde", "parallel"]
serde = ["dep:serde"]
parallel = ["dep:rayon"]
local-embedding = ["dep:tract-onnx"]
tracing = ["dep:tracing"]
watermark = ["dep:rand_chacha", "dep:rand_core", "dep:hmac", "dep:sha2"]

[dev-dependencies]
criterion = { version = "0.8.2", features = ["html_reports"] }
image = { version = "0.25", default-features = false, features = ["png"] }
serde_json = "1.0"
bincode = "1.3.3"  # v2 has breaking API changes; pin until upgrade
proptest = "1.5"

[[example]]
name = "semantic_search"
required-features = ["local-embedding"]

[[example]]
name = "serialize"
required-features = ["serde"]

[[example]]
name = "zero_copy_persistence"

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

[profile.release]
opt-level = 3
lto = true
codegen-units = 1
panic = "abort"

[profile.dev]
opt-level = 2
