comparison 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
comparison
equal deleted inserted replaced
12:4479770c2275 13:f740dadd2948
5 edition = "2018" 5 edition = "2018"
6 6
7 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
8 8
9 [features] 9 [features]
10 default = ["enable_systemd"]
10 serde = ["serde_crate", "serde_str_helpers"] 11 serde = ["serde_crate", "serde_str_helpers"]
12 enable_systemd = []
11 13
12 [target.'cfg(target_os = "linux")'.dependencies] 14 [target.'cfg(all(target_os = "linux", feature = "enable_systemd"))'.dependencies]
13 libsystemd = "0.2.1" 15 libsystemd = "0.2.1"
14 16
15 [dependencies] 17 [dependencies]
16 thiserror = "1.0.21" 18 thiserror = "1.0.21"
17 serde_crate = { package = "serde", version = "1.0.116", optional = true, features = ["derive"] } 19 serde_crate = { package = "serde", version = "1.0.116", optional = true, features = ["derive"] }