systemdaemon 1.0.0

System daemon building blocks. Designed for but not limited to systemd.
[package]
name = "systemdaemon"
version = "1.0.0"
repository = "https://codeberg.org/black-cat-engineering/systemdaemon"
description = "System daemon building blocks. Designed for but not limited to systemd."
authors = ["Simon Brummer<simon.brummer@posteo.de>"]
edition = "2024"
license = "MPL-2.0"
readme = "README.md"
rust-version = "1.88"
keywords = ["async", "linux", "systemd", "daemon", "utility"]
categories = ["asynchronous", "command-line-interface", "config", "os"]

[dependencies]
anyhow = { version = "1.0" }
serde = { version = "1.0", features = ["serde_derive"] }
thiserror = { version = "2.0" }
tracing = { version = "0.1" }
tracing-subscriber = { version = "0.3" }

# Serialization flavors
serde_json = { version = "1.0", optional = true }
toml = { version = "1.1", optional = true}
serde-saphyr = { version = "0.0", optional = true }

# Runtime agnostic crates
async-signal = { version = "0.2", optional = true }
async-timer = { version = "0.7", optional = true }
async-watch = { version = "0.3", optional = true }
cancellation-token = { version = "0.1", optional = true }
futures = { version = "0.3", optional = true }

# Tokio crates
tokio = { version = "1.52", features = ["macros", "signal", "time", "sync"], optional = true }
tokio-util = { version = "0.7", optional = true }

[target.'cfg(unix)'.dependencies]
libc = { version = "0.2" }
sd-notify = { version = "0.5", optional = true }
tracing-systemd = { version = "0.3", optional = true }

[dev-dependencies]
mockall = { version = "0.14" }
smol = { version = "2.0" }
smol-timeout = { version = "0.6" }
temp_testdir = { version = "0.2" }
tokio = { version = "1.52", features = ["rt"] }

[features]
systemd = ["dep:sd-notify", "dep:tracing-systemd"]
toml = ["dep:toml"]
yaml = ["dep:serde-saphyr"]
json = ["dep:serde_json"]
agnostic = ["dep:async-signal", "dep:async-timer", "dep:async-watch", "dep:cancellation-token", "dep:futures"]
tokio = ["dep:tokio", "dep:tokio-util"]
default = []

[workspace]
members = [
    "examples/juggler-smol",
    "examples/juggler-tokio",
]