[package]
build = "build.rs"
description = "this crate implements the core modules for the concision framework"
name = "concision-params"

authors.workspace = true
categories.workspace = true
edition.workspace = true
homepage.workspace = true
keywords.workspace = true
license.workspace = true
readme.workspace = true
repository.workspace = true
rust-version.workspace = true
version.workspace = true

[package.metadata.docs.rs]
all-features = false
features = ["full"]
rustc-args = ["--cfg", "docsrs"]
version = "v{{version}}"

[package.metadata.release]
no-dev-version = true
tag-name = "{{version}}"

[lib]
crate-type = ["cdylib", "rlib"]
bench = false
doc = true
doctest = true
test = true

[[test]]
name = "create"
required-features = ["std"]

[dependencies]
concision-init = { workspace = true }
concision-traits = { workspace = true }
# custom
variants = { workspace = true }
# concurrency & parallelism
rayon = { optional = true, workspace = true }
# data & serialization
serde = { features = ["derive"], optional = true, workspace = true }
serde_derive = { optional = true, workspace = true }
serde_json = { optional = true, workspace = true }
# error-handling
thiserror = { workspace = true }
# mathematics
approx = { optional = true, workspace = true }
ndarray = { workspace = true }
num-complex = { optional = true, workspace = true }
num-traits = { workspace = true }
# random
getrandom = { default-features = false, optional = true, workspace = true }
rand = { optional = true, workspace = true }
rand_distr = { optional = true, workspace = true }

[dev-dependencies]
lazy_static = { workspace = true }

[features]
default = ["std"]

full = [
  "default",
  "approx",
  "complex",
  "json",
  "rand",
  "serde",
]

nightly = [
  "concision-init/nightly",
  "concision-traits/nightly",
]

# ************* [FF:Dependencies] *************
std = [
  "alloc",
  "concision-init/std",
  "concision-traits/std",
  "ndarray/std",
  "num-complex?/std",
  "num-traits/std",
  "rand?/std",
  "rand?/std_rng",
  "serde/std",
  "thiserror/std",
  "variants/std",
]

wasi = [
  "concision-init/wasi",
  "concision-traits/wasi",
]

wasm = [
  "getrandom?/wasm_js",
  "concision-init/wasm",
  "concision-traits/wasm",
]
# ************* [FF:Dependencies] *************
alloc = [
  "concision-init/alloc",
  "concision-traits/alloc",
  "serde?/alloc",
  "serde_json?/alloc",
  "variants/alloc",
]

approx = [
  "dep:approx",
  "concision-init/approx",
  "ndarray/approx",
]

blas = [
  "concision-init/blas",
  "ndarray/blas",
]

complex = [
  "dep:num-complex",
  "concision-init/complex",
]

json = ["alloc", "serde", "serde_json"]

rand = [
  "dep:rand",
  "dep:rand_distr",
  "concision-init/rand",
  "concision-traits/rand",
  "num-complex?/rand",
  "rng",
]

rayon = [
  "dep:rayon",
  "ndarray/rayon",
]

rng = [
  "dep:getrandom",
  "concision-init/rng",
  "concision-traits/rng",
  "rand?/small_rng",
  "rand?/thread_rng",
]

serde = [
  "concision-init/serde",
  "dep:serde",
  "dep:serde_derive",
  "ndarray/serde",
  "num-complex?/serde",
  "rand?/serde",
  "rand_distr?/serde",
]

serde_json = ["dep:serde_json"]
