[package]
name = "libdd-common"
version = "2.0.0"
description = "Shared utilities for Datadog libraries including HTTP/HTTPS connectors, container entity detection, tag validation, rate limiting, and Unix/Windows platform helpers"
homepage = "https://github.com/DataDog/libdatadog/tree/main/datadog-common"
repository = "https://github.com/DataDog/libdatadog/tree/main/datadog-common"
edition.workspace = true
rust-version.workspace = true
license.workspace = true
[lib]
crate-type = ["lib"]
bench = false
[dependencies]
anyhow = "1.0"
futures = "0.3"
futures-core = { version = "0.3.0", default-features = false }
futures-util = { version = "0.3.0", default-features = false }
hex = "0.4"
httparse = { version = "1.9", optional = true }
hyper = { workspace = true }
hyper-util = { workspace = true }
http = "1.1"
http-body = "1.0"
http-body-util = "0.1"
tower-service = "0.3"
cc = "1.1.31"
mime = { version = "0.3.16", optional = true }
multer = { version = "3.1", optional = true }
bytes = { version = "1.4" }
pin-project = "1"
rand = { version = "0.8", optional = true }
regex = "1.5"
reqwest = { version = "0.13", features = ["rustls", "hickory-dns"], default-features = false, optional = true }
rustls-native-certs = { version = "0.8.1", optional = true }
thiserror = "1.0"
tokio = { version = "1.23", features = ["rt", "macros", "net", "io-util", "fs"] }
tokio-rustls = { version = "0.26", default-features = false, optional = true }
serde = { version = "1.0", features = ["derive"] }
static_assertions = "1.1.0"
libc = "0.2"
const_format = "0.2.34"
nix = { version = "0.29", features = ["process"] }
[target.'cfg(windows)'.dependencies.windows-sys]
version = "0.52"
features = [
"Win32_Foundation",
"Win32_System_Diagnostics_ToolHelp",
"Win32_System_Performance",
"Win32_System_Threading",
]
[target.'cfg(unix)'.dependencies]
rustls = { version = "0.23", default-features = false, optional = true, features = ["aws-lc-rs"] }
hyper-rustls = { version = "0.27", default-features = false, features = [
"native-tokio",
"http1",
"tls12",
"aws-lc-rs",
], optional = true }
[target.'cfg(not(unix))'.dependencies]
rustls = { version = "0.23", default-features = false, optional = true, features = ["ring"] }
hyper-rustls = { version = "0.27", default-features = false, features = [
"native-tokio",
"http1",
"tls12",
"ring",
], optional = true }
[dev-dependencies]
httparse = "1.9"
indexmap = "2.11"
maplit = "1.0"
mime = "0.3.16"
multer = "3.1"
bytes = "1.4"
rand = "0.8"
tempfile = "3.8"
tokio = { version = "1.23", features = ["rt", "macros", "time"] }
[features]
default = ["https"]
https = ["tokio-rustls", "rustls", "hyper-rustls", "rustls-native-certs"]
use_webpki_roots = ["hyper-rustls/webpki-roots"]
cgroup_testing = []
fips = ["https", "hyper-rustls/fips"]
reqwest = ["dep:reqwest", "test-utils"]
test-utils = ["dep:httparse", "dep:rand", "dep:mime", "dep:multer"]
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(coverage)'] }