From 48e584a969b3746d260e0ae9b96f670c19f7d3e9 Mon Sep 17 00:00:00 2001 From: "R. Tyler Croy" Date: Sun, 7 Jan 2024 12:57:53 -0800 Subject: [PATCH] Put avro dependenciies behind the `avro` feature flag Turning avro off drops about 50 crates from the default build, so useful for development, but the code would need to be cleaned up to remove this from the default features list See #163 --- Cargo.toml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 978f3a8..1ce8019 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,6 @@ edition = "2018" [dependencies] anyhow = "1" async-trait = "0.1" -apache-avro = "^0.14" base64 = "0.13" bytes = "1" chrono = "0.4.31" @@ -20,7 +19,6 @@ lazy_static = "1" log = "0" maplit = "1" rdkafka = { version = "0.28", features = ["ssl-vendored"] } -schema_registry_converter = { version = "3.1.0", features = ["easy", "json", "avro"] } serde = { version = "1", features = ["derive"] } serde_json = "1" strum = "0.20" @@ -46,13 +44,21 @@ rusoto_s3 = { version = "0.47", default-features = false, features = ["rustls"], # sentry sentry = { version = "0.23.0", optional = true } +# avro +apache-avro = { version = "^0.14", optional = true } +schema_registry_converter = { version = "3.1.0", optional = true, features = ["easy", "json", "avro"] } + # azure feature enabled, mostly used for tests azure_core = { version = "0.18.0", optional = true } azure_storage = { version = "0.18.0", optional = true } azure_storage_blobs = { version = "0.18.0", optional = true } [features] -default = [] +default = ["avro"] +avro = [ + "apache-avro", + "schema_registry_converter", +] sentry-ext = ["sentry"] dynamic-linking = [ "rdkafka/dynamic-linking" ] azure = [