[package]
name = "chaintools"
version = "0.0.2"
edition = "2024"
authors = ["alejandrogzi <alejandrxgzi@gmail.com>"]
license = "MIT"
description = "work with .chain files in Rust"
homepage = "https://github.com/alejandrogzi/chaintools"
repository = "https://github.com/alejandrogzi/chaintools"
readme = "README.md"
keywords = ["chain", "lib", "genomic", "tool"]
default-run = "chaintools"

[features]
default = ["mmap", "cli"]
cli = ["dep:clap", "dep:log", "dep:simple_logger", "sequence", "dep:num_cpus"]
mmap = ["memmap2"]
gzip = ["dep:flate2", "flate2/zlib-rs"]
parallel = ["rayon"]
index = []
sequence = ["dep:twobit"]

[dependencies]
clap = { version = "4", features = ["derive"], optional = true }
flate2 = { version = "1", optional = true, default-features = false }
memchr = "2"
memmap2 = { version = "0.9", optional = true }
rayon = { version = "1", optional = true }
log = { version = "0.4.29", optional = true }
simple_logger = { version = "5.2.0", optional = true }
twobit = { version = "0.2.2", optional = true }
num_cpus = { version = "1.17.0", optional = true }

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

[[bin]]
name = "benchmark"
path = "bench/benchmark.rs"

[profile.release]
lto = true
opt-level = 3
codegen-units = 1
strip = true
