[package]
name = "libcgroups"
version = "0.3.0" # MARK: Version
description = "Library for cgroup"
license-file = "../../LICENSE"
repository = "https://github.com/containers/youki"
homepage = "https://containers.github.io/youki"
readme = "README.md"
authors = ["youki team"]
edition = "2021"
rust-version = "1.58.1"
autoexamples = true
keywords = ["youki", "container", "cgroups"]

[features]
default = ["v1", "v2", "systemd"]
v1 = []
v2 = []
systemd = ["v2", "nix/socket", "nix/uio"]
cgroupsv2_devices = ["rbpf", "libbpf-sys", "errno", "libc", "nix/dir"]

[dependencies]
nix = { version = "0.27.1", features = ["signal", "user", "fs"] }
procfs = "0.15.1"
oci-spec = { version = "~0.6.3", features = ["runtime"] }
fixedbitset = "0.4.2"
serde = { version = "1.0", features = ["derive"] }
rbpf = { version = "0.2.0", optional = true }
libbpf-sys = { version = "1.2.1", optional = true }
errno = { version = "0.3.5", optional = true }
libc = { version = "0.2.149", optional = true }
thiserror = "1.0.49"
tracing = { version = "0.1.37", features = ["attributes"] }

[dev-dependencies]
anyhow = "1.0"
oci-spec = { version = "~0.6.3", features = ["proptests", "runtime"] }
quickcheck = "1"
mockall = { version = "0.11.4", features = [] }
clap = "4.1.6"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
env_logger = "0.10"
serial_test = "2.0.0"
tempfile = "3"
