Skip to content

Commit a8f2b8f

Browse files
authored
bridge: Cargo manifest cleanup (#1346)
## Motivation With the introduction of the kafka "plugin" crate, we now have four crates. Seems like it's about time to use workspace dependencies. ## Solution Move dependency specifications for dependencies used in multiple bridge crates out into the workspace manifest and reference them in the package manifests. Also disable publishing to crates.io and reduce tokio features, because why not.
2 parents 89df059 + 881d069 commit a8f2b8f

File tree

6 files changed

+43
-35
lines changed

6 files changed

+43
-35
lines changed

bridge/Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bridge/Cargo.toml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,21 @@
66
resolver = "2"
77

88
members = [
9-
"svix-bridge-types",
109
"svix-bridge",
10+
"svix-bridge-types",
1111
"svix-bridge-plugin-queue",
1212
"svix-bridge-plugin-kafka",
1313
]
1414

15+
[workspace.dependencies]
16+
serde = { version = "1.0.203", features = ["derive"] }
17+
serde_json = "1.0.117"
18+
svix-bridge-types = { path = "svix-bridge-types" }
19+
thiserror = "1.0.61"
20+
tokio = { version = "1.38.0", features = ["macros", "time", "rt-multi-thread", "sync"] }
21+
tracing = "0.1.40"
22+
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
23+
wiremock = "0.6.0"
24+
1525
[profile.dev.package]
1626
quote = { opt-level = 2 }

bridge/svix-bridge-plugin-kafka/Cargo.toml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@
22
name = "svix-bridge-plugin-kafka"
33
version = "0.1.0"
44
edition = "2021"
5+
publish = false
56

67
[dependencies]
78
rdkafka = { version = "0.36.0", features = ["cmake-build", "ssl", "tracing"] }
8-
serde = { version = "1.0", features = ["derive"] }
9-
serde_json = "1.0.117"
10-
svix-bridge-types = { path = "../svix-bridge-types" }
11-
thiserror = "1.0.61"
12-
tokio = { version = "1.28.1", features = ["time"] }
13-
tracing = "0.1.40"
9+
serde.workspace = true
10+
serde_json.workspace = true
11+
svix-bridge-types.workspace = true
12+
thiserror.workspace = true
13+
tokio = { workspace = true, features = ["time"] }
14+
tracing.workspace = true
1415

1516
[dev-dependencies]
1617
ctor = "0.2.8"
17-
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
18-
wiremock = "0.6.0"
18+
tracing-subscriber.workspace = true
19+
wiremock.workspace = true

bridge/svix-bridge-plugin-queue/Cargo.toml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22
name = "svix-bridge-plugin-queue"
33
version = "0.1.0"
44
edition = "2021"
5-
6-
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
5+
publish = false
76

87
[dependencies]
9-
serde_json = "1.0"
10-
serde = { version = "1.0", features = ["derive"] }
11-
svix-bridge-types = { path = "../svix-bridge-types" }
12-
thiserror = "1.0.61"
13-
tokio = { version = "1", features = ["full"] }
8+
serde.workspace = true
9+
serde_json.workspace = true
10+
svix-bridge-types.workspace = true
11+
thiserror.workspace = true
12+
tokio.workspace = true
1413
tokio-executor-trait = "2.1"
1514
tokio-reactor-trait = "1.1"
1615
tracing = "0.1"
@@ -29,5 +28,5 @@ google-cloud-googleapis = "0.12.0"
2928
google-cloud-pubsub = "0.24.0"
3029
lapin = "2"
3130
redis = { version = "0.25.4", features = ["tokio-comp", "streams"] }
32-
tracing-subscriber = "0.3"
33-
wiremock = "0.6.0"
31+
tracing-subscriber.workspace = true
32+
wiremock.workspace = true

bridge/svix-bridge-types/Cargo.toml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22
name = "svix-bridge-types"
33
version = "0.1.0"
44
edition = "2021"
5-
6-
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
5+
publish = false
76

87
[dependencies]
98
async-trait = "0.1"
10-
tokio = { version = "1", features = ["full"] }
11-
serde_json = "1"
12-
serde = { version = "1", features = ["derive"] }
9+
tokio.workspace = true
10+
serde.workspace = true
11+
serde_json.workspace = true
1312
svix = "1.17.0"

bridge/svix-bridge/Cargo.toml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
name = "svix-bridge"
33
version = "1.24.0"
44
edition = "2021"
5-
6-
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
5+
publish = false
76

87
[dependencies]
98
anyhow = "1"
@@ -15,17 +14,17 @@ once_cell = "1.18.0"
1514
opentelemetry = "0.22.0"
1615
opentelemetry_sdk = { version = "0.22.1", features = ["metrics", "rt-tokio"] }
1716
opentelemetry-otlp = { version = "0.15.0", features = ["metrics", "grpc-tonic", "http-proto", "reqwest-client"] }
18-
serde = { version = "1", features = ["derive"] }
19-
serde_json = "1"
17+
serde.workspace = true
18+
serde_json.workspace = true
2019
serde_yaml = "0.9"
2120
svix-ksuid = "0.7.0"
2221
svix-bridge-plugin-queue = { path = "../svix-bridge-plugin-queue" }
2322
svix-bridge-plugin-kafka = { optional = true, path = "../svix-bridge-plugin-kafka" }
24-
svix-bridge-types = { path = "../svix-bridge-types" }
25-
tokio = { version = "1", features = ["full"] }
26-
tracing = "0.1"
23+
svix-bridge-types.workspace = true
24+
tokio.workspace = true
25+
tracing.workspace = true
2726
tracing-opentelemetry = "0.23.0"
28-
tracing-subscriber = { version = "0.3", features = ["env-filter", "fmt", "json"] }
27+
tracing-subscriber = { workspace = true, features = ["fmt", "json"] }
2928
# N.b. for newer deno versions (like this) the runtimes must be retained and reused since they will leak memory if you
3029
# create/drop them.
3130
deno_core = "0.204.0"

0 commit comments

Comments
 (0)