Mercurial > crates > systemd-socket
diff Cargo.toml @ 6:a7893294e9b2
Make the crate compilable on non-linux systems
This makes the crate compile on other operating systems. Since systemd
is only supported on Linux, it simply disables systemd features on other
systems. The API is still the same, just parsing `systemd://` string
will return an error.
author | Martin Habovstiak <martin.habovstiak@gmail.com> |
---|---|
date | Fri, 27 Nov 2020 16:15:57 +0100 |
parents | 66c0e10c89fc |
children | 4fb70ca820a6 |
line wrap: on
line diff
--- a/Cargo.toml Fri Nov 27 15:18:25 2020 +0100 +++ b/Cargo.toml Fri Nov 27 16:15:57 2020 +0100 @@ -9,12 +9,14 @@ [features] serde = ["serde_crate", "serde_str_helpers"] +[target.'cfg(target_os = "linux")'.dependencies] +libsystemd = "0.2.1" + [dependencies] thiserror = "1.0.22" serde_crate = { package = "serde", version = "1.0.117", optional = true, features = ["derive"] } serde_str_helpers = { version = "0.1.0", optional = true } parse_arg = { version = "0.1.4", optional = true } -libsystemd = "0.2.1" lazy_static = "1.4.0" tokio_0_2 = { package = "tokio", version = "0.2", optional = true, features = ["tcp", "dns"] } tokio_0_3 = { package = "tokio", version = "0.3", optional = true, features = ["net"] }