[package]
name = "pm-remez"
version = "0.3.3"
edition = "2024"
authors = ["Daniel Estevez <daniel@destevez.net>"]
description = "Parks-McClellan Remez FIR design algorithm"
license = "MIT OR Apache-2.0"
homepage = "https://maia-sdr.org/"
repository = "https://github.com/maia-sdr/pm-remez/"
keywords = ["FIR", "remez", "DSP"]
categories = ["algorithms", "mathematics", "science"]

[lib]
name = "pm_remez"
# "cdylib" is necessary to produce a shared library for Python to import from
crate-type = ["cdylib", "rlib"]

[features]
default = ["nalgebra-backend"]

# LAPACK eigenvalue backend using ndarray-linalg
lapack-backend = ["dep:ndarray-linalg", "dep:openblas-src"]
# nalgebra eigenvalue backend
nalgebra-backend = ["dep:nalgebra"]

# LAPACK backend features forwarded to ndarray-linalg
openblas-static = ["lapack-backend", "ndarray-linalg/openblas-static"]
openblas-system = ["lapack-backend", "ndarray-linalg/openblas-system"]
netlib-static = ["lapack-backend", "ndarray-linalg/netlib-static"]
netlib-system = ["lapack-backend", "ndarray-linalg/netlib-system"]
intel-mkl-static = ["lapack-backend", "ndarray-linalg/intel-mkl-static"]
intel-mkl-system = ["lapack-backend", "ndarray-linalg/intel-mkl-system"]

# PyO3 bindings. Requires at least one of the eigenvalue backends to be enabled.
python = ["pyo3", "num-bigfloat"]

[dependencies]
itertools = "0.14"
nalgebra = { version = "0.34", optional = true }
ndarray = "0.17"
ndarray-linalg = { version = "0.18", default-features = false, optional = true }
num-complex = "0.4.3"
num-bigfloat = { version = "1.7.1", optional = true }
num-traits = "0.2"
pyo3 = { version = "0.28", optional = true, features = ["abi3-py38", "extension-module"] }
thiserror = "2"
# Temporarily added to prevent breakage:
#
# ndarray-linalg v0.18.1, pulls in lax v0.18.0, which pulls in openblas-src
# v0.10.16. However, this version of openblas-src needs either the rustls or the
# native-tls feature flags, but openblas-src is passing neither.
openblas-src = { version = "0.10.16", optional = true, features = ["rustls"] }

[dev-dependencies]
rustfft = "6.2"

[package.metadata.docs.rs]
features = ["lapack-backend", "nalgebra-backend", "num-bigfloat"]
