From 4020405738553679c3891ba07fdf7695bb283ace Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Thu, 15 Feb 2024 11:43:59 +0000 Subject: [PATCH] Move other dependencies into workspace dependencies table --- Cargo.toml | 49 ++++++++++++++++++++++++++++++++++ atrium-api/Cargo.toml | 20 +++++++------- atrium-cli/Cargo.toml | 14 +++++----- atrium-codegen/Cargo.toml | 14 +++++----- atrium-lex/Cargo.toml | 8 +++--- atrium-xrpc-client/Cargo.toml | 33 ++++++++--------------- atrium-xrpc-server/Cargo.toml | 6 ++--- atrium-xrpc/Cargo.toml | 14 +++++----- examples/concurrent/Cargo.toml | 6 ++--- examples/firehose/Cargo.toml | 10 +++---- 10 files changed, 106 insertions(+), 68 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 6af59ac3..cee312d8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,3 +38,52 @@ atrium-lex = { version = "0.1.0", path = "atrium-lex" } atrium-xrpc = { version = "0.8.0", path = "atrium-xrpc" } atrium-xrpc-client = { version = "0.2.0", path = "atrium-xrpc-client" } atrium-xrpc-server = { version = "0.1.0", path = "atrium-xrpc-server" } + +# async in traits +# Can be removed once MSRV is at least 1.75.0. +async-trait = "0.1.68" + +# DAG-CBOR codec and CAR format +ciborium = "0.2.1" +cid = "0.10.1" +libipld-core = "0.16" +rs-car = "0.4.1" +serde_ipld_dagcbor = "0.3" + +# Serde +serde = "1.0.160" +serde_bytes = "0.11.9" +serde_json = "1.0.96" +serde_qs = "0.12" +serde_repr = "0.1.12" +serde_with = "2.3.2" + +# Networking +futures = { version = "0.3.28", default-features = false } +http = "0.2.9" +isahc = "1.7.2" +reqwest = { version = "0.11.22", default-features = false } +surf = { version = "2.3.2", default-features = false } +tokio = { version = "1.33", default-features = false } +tokio-tungstenite = "0.21" + +# Errors +anyhow = "1.0.71" +thiserror = "1" + +# CLI +chrono = "0.4.24" +clap = { version = "4.2.4", features = ["derive"] } +dirs = "5.0.1" + +# Proc macros +heck = "0.4.1" +itertools = "0.10.5" +prettyplease = "0.2.15" +proc-macro2 = "1.0.56" +quote = "1.0.26" +syn = { version = "2.0.15", features = ["full"] } + +# Testing +http-client = { version = "6.5.3", default-features = false } +mockito = "1.2" diff --git a/atrium-api/Cargo.toml b/atrium-api/Cargo.toml index 247cc9f5..9e391e63 100644 --- a/atrium-api/Cargo.toml +++ b/atrium-api/Cargo.toml @@ -13,13 +13,13 @@ keywords.workspace = true [dependencies] atrium-xrpc.workspace = true -async-trait = "0.1.68" -http = "0.2.9" -serde = { version = "1.0.160", features = ["derive"] } -serde_bytes = "0.11.9" -tokio = { version = "1.33.0", default-features = false, optional = true } -cid = { version = "0.10.1", optional = true } -libipld-core = { version = "0.16.0", optional = true } +async-trait.workspace = true +http.workspace = true +serde = { workspace = true, features = ["derive"] } +serde_bytes.workspace = true +tokio = { workspace = true, optional = true } +cid = { workspace = true, optional = true } +libipld-core = { workspace = true, optional = true } [features] default = ["agent"] @@ -28,9 +28,9 @@ dag-cbor = ["cid/serde-codec", "libipld-core/serde-codec"] [dev-dependencies] atrium-xrpc-client.workspace = true -futures = "0.3.28" -serde_json = "1.0.107" -tokio = { version = "1.33.0", features = ["macros", "rt-multi-thread"] } +futures.workspace = true +serde_json.workspace = true +tokio = { workspace = true, features = ["macros", "rt-multi-thread"] } serde_ipld_dagcbor = { git = "https://github.com/sugyan/serde_ipld_dagcbor.git", rev = "345b240" } [package.metadata.docs.rs] diff --git a/atrium-cli/Cargo.toml b/atrium-cli/Cargo.toml index bacb4fde..7f05ba85 100644 --- a/atrium-cli/Cargo.toml +++ b/atrium-cli/Cargo.toml @@ -6,12 +6,12 @@ edition.workspace = true rust-version.workspace = true [dependencies] -async-trait = "0.1.74" +async-trait.workspace = true atrium-api.workspace = true atrium-xrpc-client.workspace = true -chrono = "0.4.24" -clap = { version = "4.4.8", features = ["derive"] } -dirs = "5.0.1" -serde = "1.0.160" -serde_json = "1.0" -tokio = { version = "1", features = ["full"] } +chrono.workspace = true +clap.workspace = true +dirs.workspace = true +serde.workspace = true +serde_json.workspace = true +tokio = { workspace = true, features = ["full"] } diff --git a/atrium-codegen/Cargo.toml b/atrium-codegen/Cargo.toml index 44a04719..5190412b 100644 --- a/atrium-codegen/Cargo.toml +++ b/atrium-codegen/Cargo.toml @@ -7,10 +7,10 @@ rust-version.workspace = true [dependencies] atrium-lex.workspace = true -heck = "0.4.1" -itertools = "0.10.5" -prettyplease = "0.2.15" -proc-macro2 = "1.0.56" -quote = "1.0.26" -serde_json = "1.0" -syn = { version = "2.0.15", features = ["full"] } +heck.workspace = true +itertools.workspace = true +prettyplease.workspace = true +proc-macro2.workspace = true +quote.workspace = true +serde_json.workspace = true +syn.workspace = true diff --git a/atrium-lex/Cargo.toml b/atrium-lex/Cargo.toml index 11a944f2..43f03cdc 100644 --- a/atrium-lex/Cargo.toml +++ b/atrium-lex/Cargo.toml @@ -6,9 +6,9 @@ edition.workspace = true rust-version.workspace = true [dependencies] -serde = { version = "1.0.160", features = ["derive"] } -serde_repr = "0.1.12" -serde_with = "2.3.2" +serde = { workspace = true, features = ["derive"] } +serde_repr.workspace = true +serde_with.workspace = true [dev-dependencies] -serde_json = "1.0" +serde_json.workspace = true diff --git a/atrium-xrpc-client/Cargo.toml b/atrium-xrpc-client/Cargo.toml index eee44211..41f99cde 100644 --- a/atrium-xrpc-client/Cargo.toml +++ b/atrium-xrpc-client/Cargo.toml @@ -12,23 +12,12 @@ license.workspace = true keywords.workspace = true [dependencies] -async-trait = "0.1.74" +async-trait.workspace = true atrium-xrpc.workspace = true -http = "0.2.9" - -[dependencies.isahc] -version = "1.7.2" -optional = true - -[dependencies.reqwest] -version = "0.11.22" -default-features = false -optional = true - -[dependencies.surf] -version = "2.3.2" -default-features = false -optional = true +http.workspace = true +isahc = { workspace = true, optional = true } +reqwest = { workspace = true, optional = true } +surf = { workspace = true, optional = true } [features] default = ["reqwest-native"] @@ -38,12 +27,12 @@ reqwest-rustls = ["reqwest/rustls-tls"] surf = ["dep:surf"] [dev-dependencies] -surf = { version = "2.3.2", default-features = false, features = ["h1-client-rustls"] } -http-client = { version = "6.5.3", default-features = false, features = ["h1_client", "rustls"] } -mockito = "1.2.0" -tokio = { version = "1.33.0", features = ["macros"] } -serde = { version = "1.0.192", features = ["derive"] } -futures = { version = "0.3.29", default-features = false } +surf = { workspace = true, features = ["h1-client-rustls"] } +http-client = { workspace = true, features = ["h1_client", "rustls"] } +mockito.workspace = true +tokio = { workspace = true, features = ["macros"] } +serde = { workspace = true, features = ["derive"] } +futures.workspace = true [package.metadata.docs.rs] all-features = true diff --git a/atrium-xrpc-server/Cargo.toml b/atrium-xrpc-server/Cargo.toml index 2e8143e8..d021c508 100644 --- a/atrium-xrpc-server/Cargo.toml +++ b/atrium-xrpc-server/Cargo.toml @@ -8,6 +8,6 @@ rust-version.workspace = true [dependencies] atrium-api.workspace = true -anyhow = "1.0.71" -libipld-core = { version = "0.16.0", features = ["serde-codec"] } -serde_ipld_dagcbor = "0.3.0" +anyhow.workspace = true +libipld-core = { workspace = true, features = ["serde-codec"] } +serde_ipld_dagcbor.workspace = true diff --git a/atrium-xrpc/Cargo.toml b/atrium-xrpc/Cargo.toml index ffe68eb4..ff961132 100644 --- a/atrium-xrpc/Cargo.toml +++ b/atrium-xrpc/Cargo.toml @@ -12,12 +12,12 @@ license.workspace = true keywords.workspace = true [dependencies] -async-trait = "0.1.68" -http = "0.2.9" -serde = { version = "1.0.160", features = ["derive"] } -serde_json = "1.0.96" -serde_qs = "0.12.0" -thiserror = "1.0" +async-trait.workspace = true +http.workspace = true +serde = { workspace = true, features = ["derive"] } +serde_json.workspace = true +serde_qs.workspace = true +thiserror.workspace = true [dev-dependencies] -tokio = { version = "1.33.0", features = ["macros", "rt"] } +tokio = { workspace = true, features = ["macros", "rt"] } diff --git a/examples/concurrent/Cargo.toml b/examples/concurrent/Cargo.toml index 619823bb..331588c6 100644 --- a/examples/concurrent/Cargo.toml +++ b/examples/concurrent/Cargo.toml @@ -8,6 +8,6 @@ edition = "2021" [dependencies] atrium-api.workspace = true atrium-xrpc-client.workspace = true -clap = { version = "4.4.7", features = ["derive"] } -futures = "0.3.29" -tokio = { version = "1.33.0", features = ["macros", "rt-multi-thread"] } +clap = { workspace = true, features = ["derive"] } +futures.workspace = true +tokio = { workspace = true, features = ["macros", "rt-multi-thread"] } diff --git a/examples/firehose/Cargo.toml b/examples/firehose/Cargo.toml index af500fec..564c13b4 100644 --- a/examples/firehose/Cargo.toml +++ b/examples/firehose/Cargo.toml @@ -8,8 +8,8 @@ edition = "2021" [dependencies] atrium-xrpc-server.workspace = true atrium-api = { workspace = true, features = ["dag-cbor"] } -ciborium = "0.2.1" -futures = "0.3.28" -rs-car = "0.4.1" -tokio = { version = "1.28.1", features = ["full"] } -tokio-tungstenite = { version = "0.21.0", features = ["native-tls"] } +ciborium.workspace = true +futures.workspace = true +rs-car.workspace = true +tokio = { workspace = true, features = ["full"] } +tokio-tungstenite = { workspace = true, features = ["native-tls"] }