[package]
name         = "dvb-si"
version      = "7.5.0"
edition      = "2021"
description  = "ETSI EN 300 468 DVB Service Information parser + builder. MPEG-2 PSI included."
license      = "MIT OR Apache-2.0"
authors      = ["Alex Fishlock <alex.fishlock@racingjag.com>"]
keywords     = ["dvb", "mpeg", "broadcast", "si", "psi"]
categories   = ["parser-implementations", "multimedia"]
repository   = "https://github.com/fishloa/rust-dvb"
readme       = "README.md"
rust-version = "1.81"
exclude      = ["docs/**", "tests/fixtures/**"]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
[dependencies]
dvb-common  = { path = "../dvb-common", version = "7.5", default-features = false }
thiserror = { version = "2", default-features = false }
num_enum = { version = "0.7", default-features = false }
libm = "0.2"
chrono      = { version = "0.4", optional = true, default-features = false, features = ["alloc"] }
serde         = { version = "1", optional = true, features = ["derive"] }
erased-serde  = { version = "0.4", optional = true }
bytes         = { version = "1", optional = true, default-features = false }
yoke          = { version = "0.7", optional = true, features = ["derive"] }
flate2        = { version = "1", optional = true }
encoding_rs = { version = "0.8", optional = true }

[dev-dependencies]
hex       = "0.4"
serde_json = "1.0"
criterion  = { version = "0.5", features = ["html_reports"] }

[[bench]]
name     = "si_hot_paths"
harness  = false
required-features = ["ts"]

[features]
default = ["std", "chrono", "ts", "serde"]

# `std` links the standard library. Without it the crate is `#![no_std]` and
# needs only `alloc`. chrono's wall-clock and the std `Error` glue are std-only.
std      = ["dvb-common/std", "chrono?/std", "chrono?/clock", "thiserror/std", "num_enum/std", "dep:encoding_rs", "bytes?/std"]

# Date/time decoding (MJD + BCD -> chrono DateTime<Utc>). Off = raw bytes returned.
chrono   = ["dep:chrono", "dvb-common/chrono"]

# MPEG-TS packet + SectionReassembler helpers. Off = bring-your-own section bytes.
ts       = ["dep:bytes"]

# JSON / generic serialization on parsed + owned variants. Propagates to chrono.
serde    = ["dep:serde", "dep:erased-serde", "chrono?/serde"]

# Yokeable impls on the zero-copy view types + the `Owned<T>` wrapper, so a
# parsed table/descriptor can be retained past the input buffer's borrow
# (store/cache/send across threads) without re-parsing or a mirror type.
yoke     = ["dep:yoke"]

# zlib decompression of compressed_module_descriptor (BIOP module carousels).
# Off by default; without it the compressed module bytes are exposed raw.
# flate2 requires std (it uses std::io internally).
flate2   = ["dep:flate2", "std"]
