diff --git a/Cargo.lock b/Cargo.lock index ce76324..ccc2142 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -179,17 +179,6 @@ version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" -[[package]] -name = "bencode" -version = "0.1.0" -dependencies = [ - "anyhow", - "librqbit-buffers", - "librqbit-clone-to-owned", - "serde", - "sha1w", -] - [[package]] name = "bincode" version = "1.3.3" @@ -379,11 +368,11 @@ name = "dht" version = "0.1.0" dependencies = [ "anyhow", - "bencode", "directories", "futures", "hex 0.4.3", "indexmap", + "librqbit-bencode", "librqbit-clone-to-owned", "librqbit_core", "log", @@ -896,7 +885,6 @@ version = "0.1.0" dependencies = [ "anyhow", "axum", - "bencode", "bincode", "bitvec", "byteorder", @@ -905,8 +893,10 @@ dependencies = [ "futures", "hex 0.4.3", "http", + "librqbit-bencode", "librqbit-buffers", "librqbit-clone-to-owned", + "librqbit-sha1-wrapper", "librqbit_core", "log", "openssl", @@ -920,7 +910,6 @@ dependencies = [ "serde_json", "serde_urlencoded", "sha1", - "sha1w", "size_format", "tokio", "tokio-stream", @@ -929,6 +918,17 @@ dependencies = [ "uuid", ] +[[package]] +name = "librqbit-bencode" +version = "2.2.1" +dependencies = [ + "anyhow", + "librqbit-buffers", + "librqbit-clone-to-owned", + "librqbit-sha1-wrapper", + "serde", +] + [[package]] name = "librqbit-buffers" version = "2.2.1" @@ -941,14 +941,23 @@ dependencies = [ name = "librqbit-clone-to-owned" version = "2.2.1" +[[package]] +name = "librqbit-sha1-wrapper" +version = "2.2.1" +dependencies = [ + "crypto-hash", + "openssl", + "sha1", +] + [[package]] name = "librqbit_core" version = "0.1.0" dependencies = [ "anyhow", - "bencode", "hex 0.4.3", "itertools", + "librqbit-bencode", "librqbit-buffers", "librqbit-clone-to-owned", "log", @@ -1227,10 +1236,10 @@ name = "peer_binary_protocol" version = "0.1.0" dependencies = [ "anyhow", - "bencode", "bincode", "bitvec", "byteorder", + "librqbit-bencode", "librqbit-buffers", "librqbit-clone-to-owned", "librqbit_core", @@ -1680,15 +1689,6 @@ dependencies = [ "digest", ] -[[package]] -name = "sha1w" -version = "0.1.0" -dependencies = [ - "crypto-hash", - "openssl", - "sha1", -] - [[package]] name = "size_format" version = "1.0.2" diff --git a/crates/bencode/Cargo.toml b/crates/bencode/Cargo.toml index 5dd07fc..ce27c3a 100644 --- a/crates/bencode/Cargo.toml +++ b/crates/bencode/Cargo.toml @@ -1,6 +1,6 @@ [package] -name = "bencode" -version = "0.1.0" +name = "librqbit-bencode" +version = "2.2.1" edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -16,4 +16,4 @@ serde = {version = "1", features=["derive"]} buffers = {path = "../buffers", package="librqbit-buffers", version = "2.2.1"} clone_to_owned = {path = "../clone_to_owned", package="librqbit-clone-to-owned", version = "2.2.1"} anyhow = "1" -sha1w = {path="../sha1w", default-features=false} \ No newline at end of file +sha1w = {path="../sha1w", default-features=false, package="librqbit-sha1-wrapper", version="2.2.1"} \ No newline at end of file diff --git a/crates/dht/Cargo.toml b/crates/dht/Cargo.toml index ed4cf98..ca4004f 100644 --- a/crates/dht/Cargo.toml +++ b/crates/dht/Cargo.toml @@ -11,7 +11,7 @@ tokio-stream = {version = "0.1", features = ["sync"]} serde = {version = "1", features = ["derive"]} serde_json = "1" hex = "0.4" -bencode = {path = "../bencode", default-features=false} +bencode = {path = "../bencode", default-features=false, package="librqbit-bencode", version="2.2.1"} anyhow = "1" parking_lot = "0.12" log = "0.4" diff --git a/crates/librqbit/Cargo.toml b/crates/librqbit/Cargo.toml index ffb2b51..db96420 100644 --- a/crates/librqbit/Cargo.toml +++ b/crates/librqbit/Cargo.toml @@ -15,12 +15,12 @@ rust-tls = ["reqwest/rustls-tls"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -bencode = {path = "../bencode", default-features=false} +bencode = {path = "../bencode", default-features=false, package="librqbit-bencode", version="2.2.1"} buffers = {path = "../buffers", package="librqbit-buffers", version = "2.2.1"} librqbit_core = {path = "../librqbit_core"} clone_to_owned = {path = "../clone_to_owned", package="librqbit-clone-to-owned", version = "2.2.1"} peer_binary_protocol = {path = "../peer_binary_protocol"} -sha1w = {path = "../sha1w", default-features=false} +sha1w = {path = "../sha1w", default-features=false, package="librqbit-sha1-wrapper", version="2.2.1"} dht = {path = "../dht"} tokio = {version = "1", features = ["macros", "rt-multi-thread"]} diff --git a/crates/librqbit_core/Cargo.toml b/crates/librqbit_core/Cargo.toml index 2dea1e4..b8bef62 100644 --- a/crates/librqbit_core/Cargo.toml +++ b/crates/librqbit_core/Cargo.toml @@ -14,6 +14,6 @@ log = "0.4" parking_lot = "0.12" serde = {version = "1", features=["derive"]} buffers = {path="../buffers", package="librqbit-buffers", version = "2.2.1"} -bencode = {path = "../bencode", default-features=false} +bencode = {path = "../bencode", default-features=false, package="librqbit-bencode", version="2.2.1"} clone_to_owned = {path="../clone_to_owned", package="librqbit-clone-to-owned", version = "2.2.1"} itertools = "0.11.0" diff --git a/crates/peer_binary_protocol/Cargo.toml b/crates/peer_binary_protocol/Cargo.toml index b501273..c9c4f6d 100644 --- a/crates/peer_binary_protocol/Cargo.toml +++ b/crates/peer_binary_protocol/Cargo.toml @@ -10,7 +10,7 @@ serde = {version = "1", features = ["derive"]} bincode = "1" byteorder = "1" buffers = {path="../buffers", package="librqbit-buffers", version = "2.2.1"} -bencode = {path = "../bencode", default-features=false} +bencode = {path = "../bencode", default-features=false, package="librqbit-bencode", version="2.2.1"} clone_to_owned = {path="../clone_to_owned", package="librqbit-clone-to-owned", version = "2.2.1"} librqbit_core = {path="../librqbit_core"} bitvec = "1" diff --git a/crates/sha1w/Cargo.toml b/crates/sha1w/Cargo.toml index 5c01fda..8ca97ae 100644 --- a/crates/sha1w/Cargo.toml +++ b/crates/sha1w/Cargo.toml @@ -1,6 +1,6 @@ [package] -name = "sha1w" -version = "0.1.0" +name = "librqbit-sha1-wrapper" +version = "2.2.1" edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html