[package]
name = "cdshealpix"
version = "0.9.0"
authors = ["F.-X. Pineau <francois-xavier.pineau@astro.unistra.fr>"]
edition = "2021"
rust-version = "1.81"
license = "Apache-2.0 OR MIT"
readme = "README.md"
categories = ["algorithms", "science"]
repository = "https://github.com/cds-astro/cds-healpix-rust/"
description = """
Rust implementation of the HEALPix tesselation.
"""
exclude = [
    "makeDoc.bash",
    "resources/4doc",
]

# Use:
# > cargo rustdoc --open -- --html-in-header katex.html
# to look at the doc locally
[package.metadata.docs.rs]
rustdoc-args = ["--html-in-header", "katex.html"]

[lib]
name = "cdshealpix"
path = "src/lib.rs"
test = true
doctest = true
bench = true
doc = true

[workspace]
members = [
    "crates/cli"
]

[workspace.dependencies]
log = "0.4"
rayon = "1.10"
mapproj = "0.4"
memmap2 = "0.9"
thiserror = "2.0"
colorous = "1.0"


[dependencies]
log = { workspace = true }
mapproj = { workspace = true }  # Projection to wiew skymaps/MOMs
memmap2 = { workspace = true }  # Skymaps/MOMs
rayon = { workspace = true }    # Parallelism (sort)
thiserror = { workspace = true } # Error handling
colorous = { workspace = true }  # Color map for PNG skymap/MOM

katex-doc = "0.1.0"
# MOC specific
base64 = "0.22"     # Added for Compressed MOC
num = "0.4"         # Added for MOC
num-traits = "0.2"  # Added for MOC
# Skymaps
byteorder = "1.5"
png = "0.17"
# Compression/decompression
flate2 = "1.0"
# Serialization/Deserialization
serde = { version = "1.0", features = ["derive"] } # MOM serialization/deserialization
bincode = "1.3.3"
toml = "0.8"
# MOM specific
itertools = "0.14"
# For date in FITS written files
chrono = "0.4"



[dev-dependencies]
criterion = "0.4"
rand = "0.8"
env_logger = "0.11"

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

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

[features]

# See opti here: https://github.com/johnthagen/min-sized-rust
[profile.release]
strip = true  # Automatically strip symbols from the binary.
opt-level = 3 # 1,2,3,s,z Optimize for size instead of speed
lto = true    # Optimize at the link stage (may remove dead code)
codegen-units = 1
panic = "abort"
