systemd: Require Linux for journal module

The dependency `systemd-journal-logger` does not build on macOS, and
there are no tests for other Unixes. Also, systemd is most common on
Linux.

To avoid compilation errors on non-Linux platforms, only depend on the
crate when building on Linux.

Co-authored-by: Lorenz Leutgeb <lorenz.leutgeb@radicle.xyz>
This commit is contained in:
Yorgos Saslis 2025-09-19 14:09:06 +03:00 committed by Lorenz Leutgeb
parent e70850cb36
commit 9793b4e7b6
2 changed files with 3 additions and 1 deletions

View File

@ -10,6 +10,8 @@ rust-version.workspace = true
[dependencies]
log = { workspace = true, optional = true }
[target.'cfg(target_os = "linux")'.dependencies]
systemd-journal-logger = { version = "2.2.2", optional = true }
[features]

View File

@ -1,6 +1,6 @@
//! Library for interaction with systemd, specialized for Radicle.
#[cfg(feature = "journal")]
#[cfg(all(feature = "journal", target_os = "linux"))]
pub mod journal;
#[cfg(feature = "listen")]