# 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 = "2024"
rust-version = "1.88"
name = "readcon-core"
version = "0.13.0"
build = "build.rs"
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "An oxidized single and multiple CON file reader and writer with FFI bindings for ergonomic C/C++ usage."
readme = "README.md"
keywords = [
    "Parser",
    "comp-chem",
    "file-format",
]
categories = [
    "filesystem",
    "parser-implementations",
    "science",
]
license = "MIT"
repository = "https://github.com/lode-org/readcon-core"

[package.metadata.capi]
min_version = "0.10.17"

[package.metadata.capi.header]
name = "readcon-core"
subdirectory = ""
generation = false

[package.metadata.capi.pkg_config]
name = "readcon-core"
filename = "readcon-core"
description = "CON/convel file reader and writer with FFI, Python, Julia bindings"

[[package.metadata.capi.install.include.asset]]
from = "include/readcon-core.h"

[[package.metadata.capi.install.include.asset]]
from = "include/readcon-core.hpp"

[features]
capi = []
chemfiles = ["dep:chemfiles"]
default = []
metatensor = ["dep:metatensor"]
parallel = ["rayon"]
python = [
    "dep:pyo3",
    "dep:numpy",
]
rpc = [
    "dep:capnp",
    "dep:capnp-rpc",
    "dep:capnpc",
    "dep:tokio",
    "dep:tokio-util",
    "dep:futures",
]
zstd = ["dep:zstd"]

[lib]
name = "readcon_core"
crate-type = [
    "lib",
    "cdylib",
    "staticlib",
]
path = "src/lib.rs"

[[bin]]
name = "readcon-core"
path = "src/main.rs"

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

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

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

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

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

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

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

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

[dependencies.capnp]
version = "0.20"
optional = true

[dependencies.capnp-rpc]
version = "0.20"
optional = true

[dependencies.chemfiles]
version = "0.10"
optional = true

[dependencies.dlpk]
version = "0.1.5"
features = ["ndarray"]

[dependencies.fast-float2]
version = "0.2"

[dependencies.flate2]
version = "1"

[dependencies.futures]
version = "0.3"
optional = true

[dependencies.memchr]
version = "2"

[dependencies.memmap2]
version = "0.9"

[dependencies.metatensor]
version = "0.3.0-rc2"
optional = true

[dependencies.ndarray]
version = "0.17"

[dependencies.numpy]
version = "0.28"
optional = true

[dependencies.pyo3]
version = "0.28"
features = ["extension-module"]
optional = true

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

[dependencies.rustc-hash]
version = "2"

[dependencies.serde_json]
version = "1"

[dependencies.tokio]
version = "1"
features = [
    "rt",
    "rt-multi-thread",
    "net",
    "macros",
]
optional = true

[dependencies.tokio-util]
version = "0.7"
features = ["compat"]
optional = true

[dependencies.zstd]
version = "0.13"
optional = true

[dev-dependencies.cog]
version = "0.1.0"

[dev-dependencies.criterion]
version = "0.6.0"
features = ["html_reports"]

[dev-dependencies.tempfile]
version = "3"

[build-dependencies.capnpc]
version = "0.20"
optional = true

[profile.dist]
lto = "fat"
inherits = "release"
strip = "symbols"

[profile.release]
lto = "thin"
codegen-units = 1
