summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieuCoder <matthieu@matthieu-dev.xyz>2023-01-16 13:14:40 +0400
committerMatthieuCoder <matthieu@matthieu-dev.xyz>2023-01-16 13:14:40 +0400
commite72357c34bf548ce15e7cd2424a339994c1792e1 (patch)
treec5b8767ed05aa10b30dbed054e87e7b0aabff7c1
parent5d925b8045306369ae52966f0a27d65a72cd878d (diff)
clean dependencies
-rw-r--r--.github/workflows/build.yml1
-rw-r--r--Cargo.lock22
-rw-r--r--Cargo.toml26
-rw-r--r--exes/gateway/Cargo.toml32
-rw-r--r--exes/ratelimit/Cargo.toml47
-rw-r--r--exes/rest/Cargo.toml28
-rw-r--r--exes/rest/src/handler.rs4
-rw-r--r--exes/webhook/Cargo.toml19
-rw-r--r--libs/leash/Cargo.toml16
-rw-r--r--libs/shared/Cargo.toml21
10 files changed, 107 insertions, 109 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 1f9073f..a2bb06e 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -130,7 +130,6 @@ jobs:
env:
CC: clang
run: |
- update-alternatives --set ld /usr/bin/lld
make all
- uses: actions/upload-artifact@v3
with:
diff --git a/Cargo.lock b/Cargo.lock
index d47e07f..7319bc5 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1143,9 +1143,9 @@ dependencies = [
[[package]]
name = "io-lifetimes"
-version = "1.0.3"
+version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "46112a93252b123d31a119a8d1a1ac19deac4fac6e0e8b0df58f0d4e5870e63c"
+checksum = "e7d6c6f8c91b4b9ed43484ad1a938e393caf35960fce7f82a040497207bd8e9e"
dependencies = [
"libc",
"windows-sys 0.42.0",
@@ -1218,7 +1218,6 @@ name = "leash"
version = "0.1.0"
dependencies = [
"anyhow",
- "env_logger 0.10.0",
"opentelemetry",
"opentelemetry-otlp",
"serde",
@@ -1945,6 +1944,7 @@ dependencies = [
"proto",
"redis",
"serde",
+ "serde_json",
"shared",
"test-log",
"tikv-jemallocator",
@@ -1953,6 +1953,7 @@ dependencies = [
"tokio-test",
"tonic",
"tracing",
+ "tracing-futures",
"tracing-opentelemetry",
"tracing-subscriber",
"tracing-test",
@@ -2057,7 +2058,6 @@ dependencies = [
"dns-lookup",
"futures-util",
"hashring",
- "http",
"hyper",
"hyper-rustls",
"lazy_static",
@@ -2066,12 +2066,14 @@ dependencies = [
"opentelemetry-http",
"proto",
"serde",
+ "serde_json",
"shared",
"tikv-jemallocator",
"tokio",
"tokio-stream",
"tonic",
"tracing",
+ "tracing-futures",
"tracing-opentelemetry",
"twilight-http-ratelimiting 0.14.0 (git+https://github.com/MatthieuCoder/twilight.git)",
"xxhash-rust",
@@ -2298,15 +2300,6 @@ dependencies = [
]
[[package]]
-name = "serde_test"
-version = "1.0.152"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3611210d2d67e3513204742004d6ac6f589e521861dabb0f649b070eea8bed9e"
-dependencies = [
- "serde",
-]
-
-[[package]]
name = "sha-1"
version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2368,9 +2361,6 @@ dependencies = [
"redis",
"serde",
"serde_json",
- "serde_repr",
- "serde_test",
- "thiserror",
"tokio",
"tracing",
"twilight-model",
diff --git a/Cargo.toml b/Cargo.toml
index d1d3ac4..18d452d 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -11,3 +11,29 @@ members = [
"libs/shared/",
"libs/leash/"
]
+
+[workspace.dependencies]
+shared = { path = "libs/shared" }
+proto = { path = "libs/proto" }
+leash = { path = "libs/leash" }
+
+tokio = { version = "1", features = ["rt-multi-thread"] }
+serde = { version = "1", features = ["derive"] }
+serde_json = "1"
+hyper = "0.14.23"
+
+anyhow = "1"
+
+tracing = "0.1"
+tracing-futures = "0.2"
+tracing-opentelemetry = "0.18"
+opentelemetry = "0.18"
+opentelemetry-http = "0.7"
+tikv-jemallocator = "0.5"
+
+criterion = { version = "0.4", features = ["async_tokio"] }
+tokio-test = "0.4.2"
+tracing-test = "0.2.3"
+tracing-subscriber = "0.3.16"
+test-log = { version = "*", features = ["trace"] }
+env_logger = "0.10.0" \ No newline at end of file
diff --git a/exes/gateway/Cargo.toml b/exes/gateway/Cargo.toml
index e7a0813..375a020 100644
--- a/exes/gateway/Cargo.toml
+++ b/exes/gateway/Cargo.toml
@@ -4,30 +4,24 @@ version = "0.1.0"
edition = "2018"
[dependencies]
-shared = { path = "../../libs/shared" }
-proto = { path = "../../libs/proto" }
-leash = { path = "../../libs/leash" }
+shared = { workspace = true }
+proto = { workspace = true }
+leash = { workspace = true }
+tracing-opentelemetry = { workspace = true }
+opentelemetry = { workspace = true }
+opentelemetry-http = { workspace = true }
+tracing = { workspace = true }
+tracing-futures = { workspace = true }
+tokio = { workspace = true }
+anyhow = { workspace = true }
+serde = { workspace = true }
+serde_json = { workspace = true }
-tokio = { version = "1", features = ["rt", "signal"] }
tokio-stream = "0.1.11"
-
twilight-gateway = { version = "0.14" }
twilight-model = "0.14"
-
bytes = "1.3.0"
-anyhow = "1.0.68"
-
-serde = { version = "1.0.8", features = ["derive"] }
-serde_json = { version = "1.0" }
-
-tracing = "0.1.37"
-tracing-futures = "0.2.5"
-
async-nats = "0.26.0"
-tracing-opentelemetry = "0.18.0"
-opentelemetry = "0.18.0"
-opentelemetry-http = "0.7.0"
-
[target.'cfg(not(target_os = "windows"))'.dependencies]
-tikv-jemallocator = "0.5" \ No newline at end of file
+tikv-jemallocator = { workspace = true } \ No newline at end of file
diff --git a/exes/ratelimit/Cargo.toml b/exes/ratelimit/Cargo.toml
index 1d28f3b..d7dc554 100644
--- a/exes/ratelimit/Cargo.toml
+++ b/exes/ratelimit/Cargo.toml
@@ -6,39 +6,36 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
-shared = { path = "../../libs/shared" }
-proto = { path = "../../libs/proto" }
-leash = { path = "../../libs/leash" }
-
-hyper = "0.14"
-tokio = { version = "1", features = ["rt"] }
-
-serde = { version = "1.0.8", features = ["derive"] }
+shared = { workspace = true }
+proto = { workspace = true }
+leash = { workspace = true }
+tracing-opentelemetry = { workspace = true }
+opentelemetry = { workspace = true }
+opentelemetry-http = { workspace = true }
+tracing = { workspace = true }
+tracing-futures = { workspace = true }
+tokio = { workspace = true }
+anyhow = { workspace = true }
+serde = { workspace = true }
+serde_json = { workspace = true }
+hyper = { workspace = true }
twilight-http-ratelimiting = { git = "https://github.com/MatthieuCoder/twilight.git" }
-anyhow = "*"
-tracing = "*"
-tracing-opentelemetry = "0.18.0"
-opentelemetry = "0.18.0"
-opentelemetry-http = "0.7.0"
-
tonic = "0.8.3"
tokio-stream = "0.1.11"
-
-
redis = { version = "0.22.1", features = ["cluster", "connection-manager", "tokio-comp"] }
[dev-dependencies]
-criterion = { version = "0.4", features = ["async_tokio"] }
-tokio-test = "*"
-tracing-test = "0.2.3"
-tracing-subscriber = "*"
-env_logger = "*"
-test-log = { version = "0.2.11", features = ["log", "trace"] }
+criterion = { workspace = true }
+tokio-test = { workspace = true }
+tracing-test = { workspace = true }
+tracing-subscriber = { workspace = true }
+test-log = { workspace = true }
+env_logger = { workspace = true }
+
+[target.'cfg(not(target_os = "windows"))'.dependencies]
+tikv-jemallocator = { workspace = true }
[[bench]]
name = "bucket"
harness = false
-
-[target.'cfg(not(target_os = "windows"))'.dependencies]
-tikv-jemallocator = "0.5" \ No newline at end of file
diff --git a/exes/rest/Cargo.toml b/exes/rest/Cargo.toml
index fb495a0..d37da95 100644
--- a/exes/rest/Cargo.toml
+++ b/exes/rest/Cargo.toml
@@ -6,30 +6,30 @@ edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
-shared = { path = "../../libs/shared" }
-proto = { path = "../../libs/proto" }
-leash = { path = "../../libs/leash" }
+shared = { workspace = true }
+proto = { workspace = true }
+leash = { workspace = true }
+tracing-opentelemetry = { workspace = true }
+opentelemetry = { workspace = true }
+opentelemetry-http = { workspace = true }
+tracing = { workspace = true }
+tracing-futures = { workspace = true }
+tokio = { workspace = true }
+anyhow = { workspace = true }
+serde = { workspace = true }
+serde_json = { workspace = true }
+hyper = { workspace = true }
-hyper= "0.14"
-http = "0.2.8"
-
-tokio = { version = "1", features = ["rt"] }
-serde = { version = "1.0.8", features = ["derive"] }
futures-util = "0.3.17"
hyper-rustls = "0.23.2"
lazy_static = "1.4.0"
xxhash-rust = { version = "0.8.2", features = ["xxh32"] }
twilight-http-ratelimiting = { git = "https://github.com/MatthieuCoder/twilight.git" }
-tracing = "0.1.37"
-anyhow = "1.0.68"
hashring = "0.3.0"
tonic = "0.8.3"
tokio-stream = "0.1.11"
dns-lookup = "1.0.8"
-opentelemetry = "0.18.0"
-opentelemetry-http = "0.7.0"
-tracing-opentelemetry = "0.18.0"
[target.'cfg(not(target_os = "windows"))'.dependencies]
-tikv-jemallocator = "0.5" \ No newline at end of file
+tikv-jemallocator = { workspace = true } \ No newline at end of file
diff --git a/exes/rest/src/handler.rs b/exes/rest/src/handler.rs
index 3d47935..5e5425e 100644
--- a/exes/rest/src/handler.rs
+++ b/exes/rest/src/handler.rs
@@ -1,6 +1,6 @@
use anyhow::{bail, Context};
-use futures_util::FutureExt;
-use http::{
+use futures_util::future::FutureExt;
+use hyper::http::{
header::{AUTHORIZATION, CONNECTION, HOST, TRANSFER_ENCODING, UPGRADE},
HeaderValue, Method as HttpMethod, Request, Response, Uri,
};
diff --git a/exes/webhook/Cargo.toml b/exes/webhook/Cargo.toml
index e4fc0ac..7b4a185 100644
--- a/exes/webhook/Cargo.toml
+++ b/exes/webhook/Cargo.toml
@@ -4,20 +4,19 @@ version = "0.1.0"
edition = "2018"
[dependencies]
-hyper = "0.14"
-tokio = { version = "1", features = ["rt"] }
-shared = { path = "../../libs/shared" }
-proto = { path = "../../libs/proto" }
-leash = { path = "../../libs/leash" }
-tracing = "0.1.37"
-
-serde = { version = "1.0.8", features = ["derive"] }
-serde_json = { version = "1.0" }
+tokio = { workspace = true }
+shared = { workspace = true }
+proto = { workspace = true }
+leash = { workspace = true }
+tracing = { workspace = true }
+serde = { workspace = true }
+serde_json = { workspace = true }
+hyper = { workspace = true }
+anyhow = { workspace = true }
hex = "0.4.3"
ed25519-dalek = "1"
twilight-model = { version = "0.14" }
-anyhow = "1.0.68"
async-nats = "0.26.0"
diff --git a/libs/leash/Cargo.toml b/libs/leash/Cargo.toml
index b96f384..7153cf9 100644
--- a/libs/leash/Cargo.toml
+++ b/libs/leash/Cargo.toml
@@ -6,14 +6,14 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
-shared = { path = "../shared" }
-anyhow = "1.0.68"
-tokio = { version = "1.23.1", features = ["rt", "signal"] }
-serde = "1.0.152"
+shared = { workspace = true }
+anyhow = { workspace = true }
+tokio = { workspace = true }
+serde = { workspace = true }
+opentelemetry = { workspace = true }
+tracing-opentelemetry = { workspace = true }
+tracing = { workspace = true }
+
tracing-log = { version = "0.1.3", features = ["env_logger"] }
tracing-subscriber = { version = "0.3.16", features = ["env-filter"] }
-tracing = "0.1.37"
-env_logger = "0.10.0"
-tracing-opentelemetry = "0.18.0"
-opentelemetry = { version ="0.18.0", features = ["rt-tokio"] }
opentelemetry-otlp = { version = "0.11.0", features = ["metrics"] }
diff --git a/libs/shared/Cargo.toml b/libs/shared/Cargo.toml
index 9b29bf2..90e30ce 100644
--- a/libs/shared/Cargo.toml
+++ b/libs/shared/Cargo.toml
@@ -4,23 +4,16 @@ version = "0.1.0"
edition = "2021"
[dependencies]
-serde = { version = "1.0.8", features = ["derive"] }
-serde_json = { version = "1.0" }
-serde_repr = "0.1"
+serde = { workspace = true }
+serde_json = { workspace = true }
+opentelemetry = { workspace = true }
+tracing = { workspace = true }
+tokio = { workspace = true }
config = { version = "0.13", default-features = false, features = ["json", "yaml-rust", "ini"] }
-
-async-nats = "0.26.0"
redis = { version = "0.22.1", features = ["cluster", "connection-manager", "tokio-comp"] }
-tokio = { version = "1", features = ["signal", "rt"] }
-
+async-nats = "0.26.0"
twilight-model = "0.14"
-thiserror = "1.0.38"
anyhow = "1.0.68"
-
-serde_test = "1.0.152"
-
-tracing = "0.1.37"
-opentelemetry-otlp = "0.11.0"
-opentelemetry = "0.18.0" \ No newline at end of file
+opentelemetry-otlp = "0.11.0" \ No newline at end of file