# 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 = "2021"
name = "medrs"
version = "0.1.2"
authors = ["Liam Chalcroft <liam.chalcroft.20@ucl.ac.uk>"]
build = false
exclude = [
    "docs/*",
    "tests/*",
    "benchmarks/*",
    "examples/*",
    ".github/*",
    "*.nii",
    "*.nii.gz",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Ultra-high-performance medical imaging I/O for deep learning"
homepage = "https://github.com/liamchalcroft/med-rs"
documentation = "https://medrs.readthedocs.io"
readme = "README.md"
keywords = [
    "medical-imaging",
    "nifti",
    "neuroimaging",
    "deep-learning",
    "pytorch",
]
categories = [
    "science",
    "multimedia::images",
    "api-bindings",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/liamchalcroft/med-rs"

[features]
default = []
python = [
    "pyo3",
    "numpy",
]

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

[dependencies.bytemuck]
version = "1.14"
features = ["derive"]

[dependencies.byteorder]
version = "1.5"

[dependencies.flate2]
version = "1.0"
features = ["zlib-ng"]
default-features = false

[dependencies.half]
version = "2.4"
features = [
    "bytemuck",
    "num-traits",
]

[dependencies.libdeflater]
version = "0.14"

[dependencies.memmap2]
version = "0.9"

[dependencies.ndarray]
version = "0.16"
features = ["rayon"]

[dependencies.num-traits]
version = "0.2"

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

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

[dependencies.rand]
version = "0.8"

[dependencies.rand_chacha]
version = "0.3"

[dependencies.rayon]
version = "1.10"

[dependencies.thiserror]
version = "2.0"

[dependencies.wide]
version = "0.7"

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

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

[lints.clippy]
all = "warn"
cargo = "warn"
nursery = "warn"
pedantic = "warn"

[lints.rust]
missing_docs = "warn"
unsafe_code = "warn"

[profile.bench]
lto = true
codegen-units = 1
debug = 2

[profile.dev]
opt-level = 0
debug = 2

[profile.release]
opt-level = 3
lto = true
codegen-units = 1
debug = 2
panic = "abort"
strip = true

[profile.test]
opt-level = 1
debug = 2
