From 6b97a005c4e66976694a7c09bfd099cbb3a9e445 Mon Sep 17 00:00:00 2001 From: Heinz Gies Date: Thu, 26 Sep 2024 09:49:47 +0200 Subject: [PATCH] cleanup features Signed-off-by: Heinz Gies --- Cargo.lock | 46 ++++++++++++++++++++++++++++++++++++++++++++++ Cargo.toml | 29 +++++++++++++++++++++++------ 2 files changed, 69 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5139785..0d0990d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -169,6 +169,8 @@ version = "1.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07b1695e2c7e8fc85310cde85aeaab7e3097f593c91d209d3f9df76c928100f0" dependencies = [ + "jobserver", + "libc", "shlex", ] @@ -470,6 +472,15 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +[[package]] +name = "jobserver" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +dependencies = [ + "libc", +] + [[package]] name = "libc" version = "0.2.159" @@ -596,6 +607,12 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "pkg-config" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" + [[package]] name = "ppv-lite86" version = "0.2.20" @@ -1020,6 +1037,7 @@ dependencies = [ "tower-service", "tracing", "webpki-roots", + "zstd", ] [[package]] @@ -1272,3 +1290,31 @@ name = "zeroize" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" + +[[package]] +name = "zstd" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "7.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa556e971e7b568dc775c136fc9de8c779b1c2fc3a63defaafadffdbd3181afa" +dependencies = [ + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.12+zstd.1.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a4e40c320c3cb459d9a9ff6de98cff88f4751ee9275d140e2be94a2b74e4c13" +dependencies = [ + "cc", + "pkg-config", +] diff --git a/Cargo.toml b/Cargo.toml index 3e7234c..14a08e3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,9 +19,18 @@ doctest = false all-features = true [dependencies] -prost = { version = "0.13" } -tokio = { version = "1.40.0", features = ["sync"], optional = true } -tonic = { version = "0.12", features = ["gzip", "tls", "tls-webpki-roots"] } +prost = { version = "0.13", default-features = false, features = [ + "std", + "derive", +] } +tokio = { version = "1.40.0", optional = true, default-features = false, features = [ + "sync", +] } +tonic = { version = "0.12", default-features = false, features = [ + "transport", + "codegen", + "prost", +] } [build-dependencies] tonic-build = { version = "0.12" } @@ -29,7 +38,17 @@ tonic-build = { version = "0.12" } [features] # Default - all -default = ["otel-all"] +default = ["otel-all", "gzip", "zstd", "tls"] + +# Enable channel abstraction +channels = ["dep:tokio"] + +# Enable gzip compression support +gzip = ["tonic/gzip"] +# Enable zstd compression support +zstd = ["tonic/zstd"] +# Enable tls support +tls = ["tonic/tls", "tonic/tls-webpki-roots"] # Generated from .proto definitions opentelemetry-proto-collector-logs-v1 = [] @@ -87,5 +106,3 @@ otel-trace = [ "opentelemetry-proto-trace-v1", "opentelemetry-proto-collector-trace-v1", ] - -channels = ["dep:tokio"]