[package]
name = "mf4-rs"
version = "1.7.3"
edition = "2024"
description = "mf4-rs is a Rust library for working with ASAM MDF 4 (Measurement Data Format) files."
license = "MIT"
repository = "https://github.com/dmagyar-0/mf4-rs"
readme = "README.md"

[lib]
name = "mf4_rs"
crate-type = ["cdylib", "rlib"]

[[bin]]
name = "stub_gen"
path = "src/bin/stub_gen.rs"
required-features = ["pyo3"]

[dependencies]
nom = "8"  # Used for parsing binary MDF data
byteorder = "1.5"  # Helps with reading binary data
memmap2 = "0.9.9"
meval = "0.2"  # Used for evaluating mathematical expressions
thiserror = "2.0"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

# HTTP range-reader (optional). Use native-tls (system OpenSSL on Linux,
# SecureTransport on macOS, SChannel on Windows) to avoid pulling in
# rustls -> ring, whose pre-generated ARMv8 .S files do not cross-compile
# under the manylinux2014 aarch64 toolchain (gcc fails to define __ARM_ARCH).
ureq = { version = "2", default-features = false, features = ["native-tls"], optional = true }

# Python bindings
pyo3 = { version = "0.21", features = ["extension-module", "abi3-py38"], optional = true }
numpy = { version = "0.21", optional = true }
pyo3-stub-gen = { version = "0.7", optional = true }

[dev-dependencies]
tiny_http = "0.12"
tempfile = "3"

[features]
default = []
http = ["dep:ureq"]
pyo3 = ["dep:pyo3", "dep:numpy", "dep:pyo3-stub-gen", "http"]
