[package]
name = "sdjournal"
version = "0.1.16"
description = "Pure Rust systemd journal reader and query engine"
documentation = "https://docs.rs/sdjournal"
homepage = "https://github.com/lvillis/sdjournal"
repository = "https://github.com/lvillis/sdjournal"
readme = "README.md"
license = "MIT"
edition = "2024"
rust-version = "1.96.0"
keywords = ["systemd", "journal", "journald", "logging", "linux"]
categories = ["os::unix-apis", "parsing", "filesystem"]
include = [
    "/src/**",
    "/examples/**",
    "/tests/**",
    "/CHANGELOG.md",
    "/README.md",
]

[features]
default = ["mmap", "lz4", "zstd"]
mmap = ["dep:memmap2"]
lz4 = ["dep:lz4_flex"]
zstd = ["dep:ruzstd"]
xz = ["dep:xz2"]
tracing = ["dep:tracing"]
tokio = ["dep:tokio"]
verify-seal = ["dep:hmac", "dep:sha2", "dep:num-bigint", "dep:num-traits"]

[dependencies]
# Core parsing and hashing support.
memmap2 = { version = "0.9.10", default-features = false, optional = true }
siphasher = { version = "1.0.2", default-features = false, features = ["std"] }

# Optional compression backends for journal DATA payloads.
lz4_flex = { version = "0.13.0", default-features = false, features = ["std", "safe-decode", "checked-decode"], optional = true }
ruzstd = { version = "0.8.2", default-features = false, features = ["std"], optional = true }
xz2 = { version = "0.1.7", default-features = false, features = ["static"], optional = true }

# Optional runtime integrations.
tokio = { version = "1.52.1", default-features = false, features = ["sync"], optional = true }
tracing = { version = "0.1.44", default-features = false, features = ["std"], optional = true }

# Optional FSS verification dependencies.
hmac = { version = "0.13.0", default-features = false, optional = true }
num-bigint = { version = "0.4.6", default-features = false, features = ["std"], optional = true }
num-traits = { version = "0.2.19", default-features = false, features = ["std"], optional = true }
sha2 = { version = "0.11.0", default-features = false, optional = true }

[target.'cfg(target_os = "linux")'.dependencies]
# Linux-only live tailing and polling support.
rustix = { version = "1.1.4", default-features = false, features = ["event", "fs"] }

[dev-dependencies]
# Test utilities for golden and fixture assertions.
criterion = { version = "0.8.2", default-features = false, features = ["cargo_bench_support", "plotters", "rayon"] }
serde_json = { version = "1.0.149", default-features = false, features = ["std"] }
tempfile = { version = "3.27.0", default-features = false }

[[bench]]
name = "follow_perf"
harness = false

[package.metadata.release]
allow-branch = ["main"]
consolidate-commits = true
enable-all-features = true
shared-version = true
tag-prefix = ""
tag-name = "{{version}}"
tag-message = "chore(release): {{version}}"
pre-release-commit-message = "chore(release): {{version}}"
pre-release-hook = ["git", "cliff", "--output", "CHANGELOG.md", "--tag", "{{version}}"]
