# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.88"
name = "diffusionx"
version = "0.11.4"
authors = ["Xiangong Tang <tangxiangong@gmail.com>"]
build = "build.rs"
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A multi-threaded crate for random number generation and stochastic process simulation, with optional GPU acceleration."
readme = "README.md"
keywords = [
    "stochastic-process",
    "simulation",
    "Monte-Carlo",
    "gpu",
]
categories = [
    "science",
    "mathematics",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/tangxiangong/diffusionx"

[package.metadata.docs.rs]
features = [
    "visualize",
    "io",
]
rustdoc-args = [
    "--cfg",
    "docsrs",
    "--html-in-header",
    "./docs-header.html",
]

[features]
cuda = ["dep:cudarc"]
default = ["mimalloc"]
io = ["dep:csv"]
metal = ["dep:metal"]
mimalloc = ["dep:mimalloc"]
visualize = [
    "dep:plotters",
    "dep:derive_builder",
    "dep:plotters-backend",
    "dep:either",
]

[lib]
name = "diffusionx"
path = "src/lib.rs"
doctest = false

[[example]]
name = "CIR"
path = "examples/CIR.rs"
doc-scrape-examples = false

[[example]]
name = "bm"
path = "examples/bm.rs"
doc-scrape-examples = false

[[example]]
name = "langevin"
path = "examples/langevin.rs"
doc-scrape-examples = false

[[example]]
name = "randoms"
path = "examples/randoms.rs"
doc-scrape-examples = false

[[bench]]
name = "bm"
path = "benches/bm.rs"
harness = false

[[bench]]
name = "levy"
path = "benches/levy.rs"
harness = false

[[bench]]
name = "ou"
path = "benches/ou.rs"
harness = false

[[bench]]
name = "random"
path = "benches/random.rs"
harness = false

[dependencies.csv]
version = "1.4"
optional = true

[dependencies.cudarc]
version = "0.19"
features = ["cuda-version-from-build-system"]
optional = true

[dependencies.derive_builder]
version = "0.20"
optional = true

[dependencies.either]
version = "1"
optional = true

[dependencies.gauss-quad]
version = "0.3"

[dependencies.metal]
version = "0.33"
optional = true

[dependencies.mimalloc]
version = "0.1"
optional = true

[dependencies.num-complex]
version = "0.4"

[dependencies.num-traits]
version = "0.2"

[dependencies.plotters]
version = "0.3"
optional = true

[dependencies.plotters-backend]
version = "0.3"
optional = true

[dependencies.rand]
version = "0.10"

[dependencies.rand_distr]
version = "0.6"

[dependencies.rand_xoshiro]
version = "0.8"

[dependencies.rayon]
version = "1.12"

[dependencies.realfft]
version = "3.5"

[dependencies.thiserror]
version = "2"

[dev-dependencies.criterion]
version = "0.8"

[profile.release]
lto = true
codegen-units = 1
panic = "abort"
