[package]
name = "anise"
version = { workspace = true }
authors = { workspace = true }
edition = { workspace = true }
homepage = { workspace = true }
license = { workspace = true }
repository = { workspace = true }
description = "Core of the ANISE library"

[package.metadata.docs.rs]
all-features = true
rustdoc-ars = ["--cfg", "docrs", "--generate-link-to-definition"]

[dependencies]
hifitime = { workspace = true }
memmap2 = { workspace = true }
crc32fast = { workspace = true }
der = { workspace = true }
log = { workspace = true }
nalgebra = { workspace = true }
zerocopy = { workspace = true }
bytes = { workspace = true }
snafu = { workspace = true }
const_format = "0.2"
serde = "1"
serde_derive = "1"
tabled = { workspace = true }
# Optional dependencies follow
pyo3 = { workspace = true, optional = true }
pyo3-log = { workspace = true, optional = true }
numpy = { workspace = true, optional = true }
ndarray = { workspace = true, optional = true }
url = { version = "2.5.0", optional = true }
serde_dhall = { version = "0.13", optional = true, default-features = false }
# serde_dhall = { git = "https://github.com/Nadrieril/dhall-rust/", optional = true, default-features = false }
ureq = { version = "3.0.10", default-features = false, optional = true, features = [
    "rustls",
] }
platform-dirs = { version = "0.3.0", optional = true }
rust-embed = { version = "8.4.0", features = [
    "interpolate-folder-path",
    "include-exclude",
], optional = true }
regex = { version = "1.10.5", optional = true }
rayon = { workspace = true, optional = true } # Only used when building with Python or with Analysis
serde-lexpr = {version = "0.1.3", optional = true}
csv = {version = "1", optional = true}
indexmap = "2.11.4"
hyperdual = { version = "1.4.0", optional = true }

[dev-dependencies]
rust-spice = "0.7.6"
parquet = "57.1.0"
arrow = "57.1.0"
criterion = "0.8"
iai-callgrind = "0.16"
pretty_env_logger = { workspace = true }
rstest = { workspace = true }
approx = "0.5.1"
polars = { version = "0.51.0", features = ["lazy", "parquet"] }
rayon = "1.7"
serde_yml = "0.0.12"
rand_pcg = "0.10.0"
rand = "0.10.0"

[build-dependencies]
ureq = { version = "3.0.10", default-features = false, optional = true, features = [
    "rustls",
] }

[features]
default = ["metaload", "analysis"]
python = ["pyo3", "pyo3-log", "numpy", "ndarray", "rayon"]
metaload = ["url", "ureq", "platform-dirs", "regex", "serde_dhall"]
embed_ephem = ["rust-embed", "ureq"]
analysis = ["rayon", "serde-lexpr", "csv", "hyperdual"]
# Enabling this flag significantly increases compilation times due to Arrow and Polars.
validation = []

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

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

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

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

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

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