[workspace]
name = "readcon-core"
version = "0.14.2"
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"
cachegrind-bench = { cmd = "scripts/run_cachegrind_bench.sh", description = "Valgrind Cachegrind I-refs for docs (slow)" }
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 (maintainers)" }
check-capi-headers = { cmd = "scripts/regen-capi-headers.sh --check", description = "Verify shipped C header matches what cbindgen would produce" }
check-cxx-dist = { cmd = "scripts/check-cxx-dist.sh", description = "Gate: CMake/Meson/pkg-config never require cbindgen" }
package-cxx = { cmd = "scripts/package-cxx.sh dist-cxx", description = "Assemble readcon-core-cxx-$VERSION.tar.gz" }
prek = { cmd = "prek run -a", description = "Run prek hooks on all files" }
prek-install = { cmd = "prek install", description = "Install prek git hooks in this checkout" }
[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-build-chemfiles = "maturin develop --features python,chemfiles", python-test = { cmd = "pytest tests/python/", depends-on = [
"python-build",
] }, chemfiles-notebook = { cmd = "scripts/run-chemfiles-notebook.sh", depends-on = [
"python-build-chemfiles",
], description = "Org Babel executable chemfiles→CON tutorial" }, tutorial-core = { cmd = "scripts/run-tutorial-core.sh", depends-on = [
"python-build",
], description = "Org Babel One Good Tutorial (CON checkpoint)" } }
[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-bibtex = ">=2.6, <3"
sphinx-copybutton = ">=0.5.2, <1"
sphinx-design = ">=0.6, <1"
myst-parser = ">=4.0, <5"
sphinxcontrib-mermaid = ">=1.0, <2"
[feature.docs.tasks]
setup-rustdocgen = { cmd = "cargo install sphinx-rustdocgen", description = "Install sphinx-rustdocgen for Rust API docs" }
docbld-full = { cmd = "sphinx-build docs/source docs/build -b html", depends-on = [
"orgbld",
"setup-rustdocgen",
], description = "Docs including fresh rustdocgen" }
orgbld = "emacs --batch -l docs/export.el"
fix-doc-links = { cmd = "python docs/scripts/fix_doc_links.py", depends-on = [
"orgbld",
], description = "Rewrite .rst hyperlinks to :doc: roles" }
docbld = { cmd = "sphinx-build docs/source docs/build -b html", depends-on = [
"fix-doc-links",
] }
linkcheck = { cmd = "lychee --config lychee.toml 'docs/build/**/*.html'", depends-on = [
"docbld",
], description = "Lychee link check on built HTML" }
[environments]
default = { solve-group = "default" }
python = { features = ["python"], solve-group = "default" }
julia = { features = ["julia"], solve-group = "julia" }
docs = { features = ["docs"], solve-group = "default" }