diff Cargo.toml @ 13:f740dadd2948

Added enable_systemd feature This feature makes systemd support optional, on by default. While it may seem strange that this feature exists, it makes sense for authors of applications who want to make systemd optional. Thanks to this feature the interface stays the same, it just fails to parse `systemd://` addresses with a helpful error message.
author Martin Habovstiak <martin.habovstiak@gmail.com>
date Thu, 03 Dec 2020 16:34:09 +0100
parents 4479770c2275
children 2039b5d39d72
line wrap: on
line diff
--- a/Cargo.toml	Sun Nov 29 14:15:33 2020 +0100
+++ b/Cargo.toml	Thu Dec 03 16:34:09 2020 +0100
@@ -7,9 +7,11 @@
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
 
 [features]
+default = ["enable_systemd"]
 serde = ["serde_crate", "serde_str_helpers"]
+enable_systemd = []
 
-[target.'cfg(target_os = "linux")'.dependencies]
+[target.'cfg(all(target_os = "linux", feature = "enable_systemd"))'.dependencies]
 libsystemd = "0.2.1"
 
 [dependencies]