[package] name = "qsu" version = "0.5.0" edition = "2021" license = "0BSD" # https://crates.io/category_slugs categories = [ "os" ] keywords = [ "service", "systemd", "winsvc" ] repository = "https://repos.qrnch.tech/pub/qsu" description = "Service subsystem wrapper." rust-version = "1.56" exclude = [ ".fossil-settings", ".efiles", ".fslckout", "www", "build_docs.sh", "Rocket.toml", "rustfmt.toml" ] # https://doc.rust-lang.org/cargo/reference/manifest.html#the-badges-section [badges] maintenance = { status = "experimental" } [features] default = ["rt"] clap = ["dep:clap", "dep:itertools"] full = ["clap", "installer", "rocket", "rt", "systemd", "tokio"] installer = ["dep:sidoc"] systemd = ["dep:sd-notify"] rocket = ["rt", "dep:rocket", "tokio"] rt = [] tokio = ["rt", "tokio/macros", "tokio/rt-multi-thread", "tokio/signal"] wait-for-debugger = ["dep:dbgtools-win"] [dependencies] apperr = { version = "0.2.0" } async-trait = { version = "0.1.80" } chrono = { version = "0.4.38" } clap = { version = "4.5.4", optional = true, features = [ "derive", "env", "string", "wrap_help" ] } env_logger = { version = "0.11.3" } futures = { version = "0.3.30" } itertools = { version = "0.13.0", optional = true } killswitch = { version = "0.4.2" } log = { version = "0.4.20" } parking_lot = { version = "0.12.2" } rocket = { version = "0.5.0", optional = true } sidoc = { version = "0.1.0", optional = true } tokio = { version = "1.37.0", features = ["sync"] } time = { version = "0.3.36", features = ["macros"] } tracing = { version = "0.1.40" } [dependencies.tracing-subscriber] version = "0.3.18" default-features = false features = ["env-filter", "time", "fmt", "ansi"] [target.'cfg(target_os = "linux")'.dependencies] sd-notify = { version = "0.4.1", optional = true } [target.'cfg(unix)'.dependencies] libc = { version = "0.2.155" } nix = { version = "0.28.0", features = ["pthread", "signal"] } [target.'cfg(windows)'.dependencies] dbgtools-win = { version = "0.2.1", optional = true } eventlog = { version = "0.2.2" } registry = { version = "1.2.3" } scopeguard = { version = "1.2.0" } windows-service = { version = "0.7.0" } windows-sys = { version = "0.52.0", features = [ "Win32_Foundation", "Win32_System_Console" ] } winreg = { version = "0.52.0" } [dev-dependencies] clap = { version = "4.5.4", features = ["derive", "env", "wrap_help"] } tokio = { version = "1.37.0", features = ["time"] } [package.metadata.docs.rs] all-features = true rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"] [[example]] name = "hellosvc" required-features = ["clap", "installer", "rt"] [[example]] name = "hellosvc-tokio" required-features = ["clap", "installer", "rt", "tokio"] [[example]] name = "hellosvc-rocket" required-features = ["clap", "installer", "rt", "rocket"]