# 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 = "2021"
name = "alkahest-cas"
version = "2.4.0"
authors = ["Alkahest Contributors"]
build = "build.rs"
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "High-performance computer algebra kernel: symbolic expressions, polynomials, Gröbner bases, JIT, and Arb ball arithmetic."
homepage = "https://alkahest-cas.github.io/alkahest/"
documentation = "https://docs.rs/alkahest-cas"
readme = "README.md"
keywords = [
    "computer-algebra",
    "symbolic-math",
    "polynomial",
    "groebner",
    "jit",
]
categories = [
    "mathematics",
    "science",
]
license = "Apache-2.0"
repository = "https://github.com/alkahest-cas/alkahest"

[package.metadata.docs.rs]
features = [
    "egraph",
    "groebner",
    "parallel",
]
rustdoc-args = [
    "--cfg",
    "docsrs",
]

[features]
cranelift = [
    "dep:cranelift-jit",
    "dep:cranelift-codegen",
    "dep:cranelift-frontend",
    "dep:cranelift-module",
    "dep:cranelift-native",
]
cuda = [
    "jit",
    "dep:cudarc",
]
default = ["groebner"]
egraph = ["dep:egglog"]
flint3 = []
groebner = []
groebner-cuda = [
    "groebner",
    "dep:cudarc",
]
jit = ["dep:inkwell"]
parallel = [
    "dep:rayon",
    "dep:dashmap",
]

[lib]
name = "alkahest_cas"
path = "src/lib.rs"

[[example]]
name = "cpu_jit_probe"
path = "examples/cpu_jit_probe.rs"

[[example]]
name = "dump_ptx"
path = "examples/dump_ptx.rs"
required-features = ["cuda"]

[[test]]
name = "groebner_cuda"
path = "tests/groebner_cuda.rs"

[[test]]
name = "nvptx_gpu"
path = "tests/nvptx_gpu.rs"

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

[dependencies.bitflags]
version = "2.11.1"

[dependencies.boxcar]
version = "0.2.14"

[dependencies.cranelift-codegen]
version = "0.132"
optional = true

[dependencies.cranelift-frontend]
version = "0.132"
optional = true

[dependencies.cranelift-jit]
version = "0.132"
optional = true

[dependencies.cranelift-module]
version = "0.132"
optional = true

[dependencies.cranelift-native]
version = "0.132"
optional = true

[dependencies.cudarc]
version = "0.19"
features = [
    "driver",
    "nvrtc",
    "fallback-dynamic-loading",
    "cuda-12060",
]
optional = true
default-features = false

[dependencies.dashmap]
version = "6"
optional = true

[dependencies.egglog]
version = "0.4"
optional = true

[dependencies.gmp-mpfr-sys]
version = "1"
features = ["force-cross"]

[dependencies.inkwell]
version = "0.9"
features = ["llvm15-0-prefer-dynamic"]
optional = true

[dependencies.num-integer]
version = "0.1"

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

[dependencies.rug]
version = "1"
features = [
    "integer",
    "rational",
    "float",
]

[dependencies.wide]
version = "0.7"

[dev-dependencies.codspeed-criterion-compat]
version = "2"
features = ["html_reports"]

[dev-dependencies.proptest]
version = "1"
