[workspace]
name = "readcon-core"
version = "0.13.0"
description = "CON/convel file reader and writer with FFI, Python, Julia bindings"
channels = ["conda-forge"]
platforms = ["linux-64", "osx-arm64", "osx-64"]

[tasks]
test = "cargo test"
test-all = "cargo test --all-features"
bench = "cargo bench"
build = "cargo build --release"
build-rpc = "cargo build --release --features rpc"
regen-capi-headers = { cmd = "scripts/regen-capi-headers.sh", description = "Regenerate include/readcon-core.h via cbindgen" }
check-capi-headers = { cmd = "scripts/regen-capi-headers.sh --check", description = "Verify shipped C header matches what cbindgen would produce" }

[dependencies]
rust = ">=1.88"
capnproto = "*"

[feature.python]
dependencies = { python = ">=3.10", maturin = ">=1.5", pytest = "*", pip = "*", numpy = ">=1.22" }
tasks = { python-build = "maturin develop --features python", python-test = { cmd = "pytest tests/python/", depends-on = ["python-build"] } }

[feature.julia]
platforms = ["linux-64"]
dependencies = { julia = ">=1.10" }
tasks = { julia-test = "julia --project=julia/ReadCon -e 'using Pkg; Pkg.test()'" }

[feature.docs]
dependencies = { python = ">=3.10", emacs = "*", sphinx = ">=7,<9", pandoc = ">=3.1,<4" }
[feature.docs.pypi-dependencies]
shibuya = ">=2026.1.9, <2027"
sphinxcontrib-rust = ">=1.0.0, <2"
sphinx-rustdoc-postprocess = ">=0.1.0, <0.2"
sphinxcontrib-bibtex = ">=2.6, <3"
[feature.docs.tasks]
setup-rustdocgen = { cmd = "cargo install sphinx-rustdocgen", description = "Install sphinx-rustdocgen for Rust API docs" }
orgbld = "emacs --batch -l docs/export.el"
docbld = { cmd = "sphinx-build docs/source docs/build -b html", depends-on = ["orgbld", "setup-rustdocgen"] }

[environments]
default = { solve-group = "default" }
python = { features = ["python"], solve-group = "default" }
julia = { features = ["julia"], solve-group = "julia" }
docs = { features = ["docs"], solve-group = "default" }
