[package]
name = "num-valid"
version = "0.2.5"
edition = "2024"
authors = ["Massimiliano Martinelli <martinelli@imati.cnr.it>"]
repository = "https://gitlab.com/max.martinelli/num-valid"
documentation = "https://docs.rs/num-valid"
readme = "README.md"
description = "A robust numerical library providing validated types for real and complex numbers to prevent common floating-point errors like NaN propagation. Features a generic, layered architecture with support for native f64 and optional arbitrary-precision arithmetic."
categories = ["mathematics"]
keywords = ["mathematics", "numerics", "complex-numbers", "arbitrary-precision"]
license-file = "LICENSE.md"

[dependencies]
az = "1.2"
bytemuck = { version = "1.24", features = ["extern_crate_alloc"] }
derive_more = { version = "2.0.1", features = ["full"] }
duplicate = "2.0.1"
getset = "0.1.6"
into_inner = "0.1.2"
num = { version = "0.4.3", features = ["serde"] }
num-traits = "0.2.19"
paste = { version = "1.0" }
rand = { version = "0.9.2" }
rug = { version = "1.28.0", optional = true, features = ["serde"] }
thiserror = "2.0.17"
try_create = "0.1.2"
serde = { version = "1.0.228", features = ["derive"] }


[features]
# Enables backtrace capture in error types for debugging.
# When disabled (default), backtraces are not captured, improving performance.
# Enable this feature during development or debugging to get detailed error traces.
backtrace = []

# Enables the arbitrary-precision numerical kernel using the `rug` crate.
# NOTE: `rug` is licensed under LGPL-3.0, which may have implications for your project.
# See LICENSE.md for details.
rug = ["dep:rug"]


[dev-dependencies]
criterion = { version = "0.7", features = ["html_reports"] }

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


[package.metadata.docs.rs]
# this generates the documentation on docs.rs with the `rug` feature
features = ["rug"]
