sys: feature-gate logrotate (and zstd)

it's not needed everywhere we pull in proxmox-sys.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler 2022-06-02 14:08:06 +02:00
parent a3efe0b3dc
commit 97fd3a0a14
2 changed files with 3 additions and 1 deletions

View File

@ -18,7 +18,7 @@ nix = "0.24.1"
regex = "1.2" regex = "1.2"
serde_json = "1.0" serde_json = "1.0"
serde = { version = "1.0", features = [ "derive" ] } serde = { version = "1.0", features = [ "derive" ] }
zstd = { version = "0.6", features = [ "bindgen" ] } zstd = { version = "0.6", features = [ "bindgen" ], optional = true}
# Macro crates: # Macro crates:
proxmox-sortable-macro = { path = "../proxmox-sortable-macro", optional = true, version = "0.1.2" } proxmox-sortable-macro = { path = "../proxmox-sortable-macro", optional = true, version = "0.1.2" }
@ -31,3 +31,4 @@ proxmox-time = { path = "../proxmox-time", version = "1.0.0" }
[features] [features]
default = [] default = []
sortable-macro = ["proxmox-sortable-macro"] sortable-macro = ["proxmox-sortable-macro"]
logrotate = ["zstd"]

View File

@ -7,6 +7,7 @@ pub mod error;
pub mod fd; pub mod fd;
pub mod fs; pub mod fs;
pub mod linux; pub mod linux;
#[cfg(feature = "logrotate")]
pub mod logrotate; pub mod logrotate;
pub mod macros; pub mod macros;
pub mod mmap; pub mod mmap;