From 15e23473fe4511bd3074438c3faf4d8fe8ae8cd9 Mon Sep 17 00:00:00 2001 From: David Calavera Date: Sat, 28 May 2022 10:15:11 -0700 Subject: [PATCH] Reduce dependency features This saves about 12 seconds of build times in simple functions. - Stop compiling Tower full - Remove server and runtime features from hyper Signed-off-by: David Calavera --- lambda-runtime-api-client/Cargo.toml | 2 +- lambda-runtime/Cargo.toml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lambda-runtime-api-client/Cargo.toml b/lambda-runtime-api-client/Cargo.toml index 2b8291b8..8a8a29b2 100644 --- a/lambda-runtime-api-client/Cargo.toml +++ b/lambda-runtime-api-client/Cargo.toml @@ -12,6 +12,6 @@ readme = "README.md" [dependencies] http = "0.2" -hyper = { version = "0.14", features = ["http1", "client", "server", "stream", "runtime"] } +hyper = { version = "0.14", features = ["http1", "client", "stream", "tcp"] } tower-service = "0.3" tokio = { version = "1.0", features = ["io-util"] } diff --git a/lambda-runtime/Cargo.toml b/lambda-runtime/Cargo.toml index 98592eb7..a5cc27aa 100644 --- a/lambda-runtime/Cargo.toml +++ b/lambda-runtime/Cargo.toml @@ -16,14 +16,14 @@ simulated = [] [dependencies] tokio = { version = "1.0", features = ["macros", "io-util", "sync", "rt-multi-thread"] } -hyper = { version = "0.14", features = ["http1", "client", "server", "stream", "runtime"] } +hyper = { version = "0.14", features = ["http1", "client", "stream", "tcp"] } serde = { version = "1", features = ["derive"] } serde_json = "^1" bytes = "1.0" http = "0.2" async-stream = "0.3" tracing = { version = "0.1", features = ["log"] } -tower = { version = "0.4", features = ["full"] } +tower = { version = "0.4", features = ["util"] } tokio-stream = "0.1.2" lambda_runtime_api_client = { version = "0.5", path = "../lambda-runtime-api-client" }