[package]
name = "spectrograms"
version = "2.1.3"
edition = "2024"
authors = ["Jack Geraghty (jmg049) <jgeraghty049@gmail.com>"]
description = "High-performance FFT-based computations for audio and image processing"
repository = "https://github.com/jmg049/Spectrograms"
license = "MIT"
keywords = ["fft", "spectrogram", "audio", "image", "signal-processing"]
categories = ["multimedia::audio", "multimedia::images", "science"]
readme = "README.md"
exclude = [
    # Python package (top-level only, NOT src/python/)
    "/python/",
    "pyproject.toml",
    "uv.lock",

    # Documentation
    "/docs/",
    "/manual/",
    "/imgs/",
    "PYTHON_BENCHMARK.md",

    # Build scripts
    "build_docs.py",
    "deploy_docs.sh",

    # Examples, tests, benchmarks
    "/examples/",
    "/tests/",
    "/benches/",

    # Images and media
    "*.png",
    "*.jpg",
    "*.jpeg",
    "*.gif",
    "*.pdf",
    "*.zip",

    # CI/CD and workspace
    ".github/",
    "*.code-workspace",
]

[package.metadata.docs.rs]
all-features = false
features = ["realfft", "serde", "python"]
rustdoc-args = ["--cfg", "docsrs"]

[dependencies]
fftw-sys = { version = "0.8.0", optional = true }
ndarray = { version = ">=0.17", features = ["serde"] }
pyo3 = { version = "0.29.0", optional = true, features = [
    "experimental-inspect",
    "py-clone",
] }
numpy = { version = "0.29.0", optional = true }
num-complex = { version = "0.4.6", features = ["serde"] }
num-traits = "0.2.19"

realfft = { version = "3.5.0", optional = true }
rustfft = { version = "6.4.1", optional = true }
regex = "1.12.4"
serde = { version = "1.0", features = ["derive"], optional = true }
thiserror = "2.0.18"
non-empty-slice = { version = "0.6.0", features = ["serde"] }
bincode2 = { version = "2.0.1", optional = true }
once_cell = "1.21.4"
rayon = { version = "1.12.0", optional = true }


[features]
default = ["realfft"]
fftw = ["dep:fftw-sys"]
realfft = ["dep:realfft", "dep:rustfft"]
serde = ["dep:serde"]
python = ["dep:pyo3", "dep:numpy"]
rayon = ["dep:rayon", "ndarray/rayon"]

[build-dependencies]
pkg-config = "0.3.33"

[dev-dependencies]
bincode2 = "2.0.1"
rmp-serde = "1.1"
serde_json = "1.0.150"
num-format = "0.4.4"
criterion = { version = "0.8.2", features = ["html_reports"] }

[lib]
crate-type = ["lib", "cdylib"]

[profile.bench]
opt-level = 3
lto = true
codegen-units = 1
strip = "symbols"
debug = false

# Benchmarks configuration
[[bench]]
name = "fft1d_benchmarks"
harness = false

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

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

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

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

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

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

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