[package]
name = "immunum"
version = "1.0.0"
edition = "2021"
default-run = "immunum"
description = "Fast antibody and T-cell receptor numbering in Rust and Python"
license = "MIT"
repository = "https://github.com/ENPICOM/immunum"
homepage = "https://immunum.enpicom.com"
documentation = "https://immunum.enpicom.com"
categories = ["science::bioinformatics", "command-line-utilities"]
keywords = ["antibody", "numbering", "schemes", "python", "imgt"]
authors = ["ENPICOM <dev@enpicom.com>"]
readme = "README.md"
include = [
    "src/**",
    "build.rs",
    "resources/consensus/*.csv",
    "/README.md",
    "/LICENSE",
    "Cargo.toml",
]

[features]
default = ["cli"]
cli = ["dep:clap", "dep:chrono", "dep:toml"]
python = ["dep:pyo3", "dep:postcard", "dep:pyo3-build-config"]
polars = [
    "dep:polars",
    "dep:polars-arrow",
    "dep:polars-core",
    "dep:pyo3-polars",
    "dep:postcard",
]
wasm = ["dep:wasm-bindgen", "dep:js-sys"]

[dependencies]
serde = { version = "1.0", features = ["derive"] }
serde_json = { version = "1.0", features = ["preserve_order"] }
thiserror = "2.0"
strum = "0.27"
strum_macros = "0.27"
toml = { version = "0.8", optional = true }
chrono = { version = "0.4", optional = true }
clap = { version = "4.5.60", features = ["derive"], optional = true }

pyo3 = { version = "0.25.0", features = [
    "abi3-py39",
    "multiple-pymethods",
    "extension-module",
], optional = true }
postcard = { version = "=1.1.3", features = ["alloc"], optional = true }

polars = { version = "0.51.0", default-features = false, optional = true }
polars-core = { version = "0.51.0", default-features = false, optional = true }
polars-arrow = { version = "0.51.0", default-features = false, optional = true }
pyo3-polars = { version = "0.24.0", features = [
    "derive",
    "dtype-struct",
    "dtype-array",
], optional = true }
wasm-bindgen = { version = "0.2.114", optional = true }
js-sys = { version = "0.3", optional = true }


[dev-dependencies]
wasm-bindgen-test = "0.3"

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
assert_cmd = "2"
predicates = "3"
tempfile = "3"
criterion = { version = "0.5", features = ["html_reports"] }

[build-dependencies]
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
pyo3-build-config = { version = "0.25", optional = true }

[profile.release]
codegen-units = 1
debug = false
lto = "fat"

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

[[bin]]
name = "immunum"
path = "src/main.rs"
required-features = ["cli"]

[[bin]]
name = "debug-validation"
path = "src/bin/debug_validation.rs"
required-features = ["cli"]

[[bin]]
name = "benchmark"
path = "src/bin/benchmark.rs"
required-features = ["cli"]

[[bench]]
name = "speed-benchmark"
path = "benches/speed_benchmark.rs"
harness = false
