[package]
name = "diffsol"
version = "0.8.3"
edition.workspace = true
description = "A library for solving ordinary differential equations (ODEs) in Rust."
license.workspace = true
authors.workspace = true
repository.workspace = true
readme = "../README.md"


# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[features]
default = ["nalgebra", "faer"]
faer = []
nalgebra = []
cuda = ["dep:cudarc"]
sundials = ["suitesparse_sys", "bindgen", "cc"]
suitesparse = ["suitesparse_sys"]
diffsl = []
diffsl-cranelift = ["diffsl/cranelift", "diffsl"]
diffsl-llvm = []
diffsl-llvm15 = ["diffsl/llvm15-0", "diffsl", "diffsl-llvm"]
diffsl-llvm16 = ["diffsl/llvm16-0", "diffsl", "diffsl-llvm"]
diffsl-llvm17 = ["diffsl/llvm17-0", "diffsl", "diffsl-llvm"]
diffsl-llvm18 = ["diffsl/llvm18-1", "diffsl", "diffsl-llvm"]
diffsl-llvm19 = ["diffsl/llvm19-1", "diffsl", "diffsl-llvm"]
diffsl-llvm20 = ["diffsl/llvm20-1", "diffsl", "diffsl-llvm"]
diffsl-llvm21 = ["diffsl/llvm21-1", "diffsl", "diffsl-llvm"]

[dependencies]
nalgebra = { workspace = true }
nalgebra-sparse = { version = "0.11.0", features = ["io"] }
num-traits = "0.2.17"
serde = { version = "1.0", features = ["derive"] }
diffsl = { package = "diffsl", version = "0.6.3", optional = true, features = [
    "rayon",
] }
petgraph = "0.8.3"
suitesparse_sys = { version = "0.1.3", optional = true }
thiserror = "2.0.17"
faer-traits = "0.23.2"
cudarc = { workspace = true, optional = true, default-features = false, features = [
    "cuda-version-from-build-system",
    "cusolver",
    "dynamic-linking",
    "std",
    "cublas",
    "cublaslt",
    "curand",
    "driver",
    "runtime",
    "nvrtc",
] }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
faer = { workspace = true, features = [ "rayon" ] } 

[target.'cfg(target_arch = "wasm32")'.dependencies]
faer = { workspace = true }

[dev-dependencies]
insta = { version = "1.43", features = ["yaml"] }
criterion = { version = "0.7.0" }
skeptic = "0.13.7"
paste = "1.0.15"

[build-dependencies]
bindgen = { version = "0.72.1", optional = true }
cc = { version = "1.2", optional = true }

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

[package.metadata.docs.rs]
features = ["diffsl-llvm15", "diffsl-cranelift"]
