From bc4ada104dff7459f174f186531965b07c8ffc5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Frosteg=C3=A5rd?= Date: Mon, 25 May 2020 19:21:52 +0200 Subject: [PATCH] rename crate "bittorrent_udp" to "aquatic_udp_protocol" --- Cargo.lock | 67 +++++++++---------- Cargo.toml | 2 +- aquatic_udp/Cargo.toml | 2 +- aquatic_udp/src/lib/common.rs | 2 +- aquatic_udp/src/lib/handlers.rs | 2 +- aquatic_udp/src/lib/network.rs | 4 +- aquatic_udp_bench/Cargo.toml | 1 - aquatic_udp_load_test/Cargo.toml | 2 +- aquatic_udp_load_test/src/common.rs | 2 +- aquatic_udp_load_test/src/handler.rs | 2 +- aquatic_udp_load_test/src/network.rs | 4 +- aquatic_udp_load_test/src/utils.rs | 2 +- .../Cargo.toml | 2 +- .../src/converters/common.rs | 0 .../src/converters/mod.rs | 0 .../src/converters/requests.rs | 0 .../src/converters/responses.rs | 0 .../src/lib.rs | 0 .../src/types/common.rs | 0 .../src/types/mod.rs | 0 .../src/types/request.rs | 0 .../src/types/response.rs | 0 22 files changed, 46 insertions(+), 48 deletions(-) rename {bittorrent_udp => aquatic_udp_protocol}/Cargo.toml (88%) rename {bittorrent_udp => aquatic_udp_protocol}/src/converters/common.rs (100%) rename {bittorrent_udp => aquatic_udp_protocol}/src/converters/mod.rs (100%) rename {bittorrent_udp => aquatic_udp_protocol}/src/converters/requests.rs (100%) rename {bittorrent_udp => aquatic_udp_protocol}/src/converters/responses.rs (100%) rename {bittorrent_udp => aquatic_udp_protocol}/src/lib.rs (100%) rename {bittorrent_udp => aquatic_udp_protocol}/src/types/common.rs (100%) rename {bittorrent_udp => aquatic_udp_protocol}/src/types/mod.rs (100%) rename {bittorrent_udp => aquatic_udp_protocol}/src/types/request.rs (100%) rename {bittorrent_udp => aquatic_udp_protocol}/src/types/response.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index 5acd72d..117a028 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -35,7 +35,7 @@ version = "0.1.0" dependencies = [ "anyhow", "aquatic_common", - "bittorrent_udp", + "aquatic_udp_protocol", "cli_helpers", "crossbeam-channel", "hashbrown", @@ -58,7 +58,6 @@ version = "0.1.0" dependencies = [ "anyhow", "aquatic_udp", - "bittorrent_udp", "cli_helpers", "crossbeam-channel", "indicatif", @@ -75,7 +74,7 @@ name = "aquatic_udp_load_test" version = "0.1.0" dependencies = [ "anyhow", - "bittorrent_udp", + "aquatic_udp_protocol", "cli_helpers", "crossbeam-channel", "hashbrown", @@ -90,6 +89,15 @@ dependencies = [ "socket2", ] +[[package]] +name = "aquatic_udp_protocol" +version = "0.1.0" +dependencies = [ + "byteorder", + "quickcheck", + "quickcheck_macros", +] + [[package]] name = "aquatic_ws" version = "0.1.0" @@ -187,15 +195,6 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" -[[package]] -name = "bittorrent_udp" -version = "0.1.0" -dependencies = [ - "byteorder", - "quickcheck", - "quickcheck_macros", -] - [[package]] name = "block-buffer" version = "0.7.3" @@ -237,9 +236,9 @@ checksum = "130aac562c0dd69c56b3b1cc8ffd2e17be31d0b6c25b61c96b76231aa23e39e1" [[package]] name = "cc" -version = "1.0.53" +version = "1.0.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "404b1fe4f65288577753b17e3b36a04596ee784493ec249bf81c7f2d2acd751c" +checksum = "7bbb73db36c1246e9034e307d0fba23f9a2e251faa47ade70c1bd252220c8311" [[package]] name = "cfg-if" @@ -279,18 +278,18 @@ dependencies = [ [[package]] name = "cmake" -version = "0.1.43" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f97562167906afc51aa3fd7e6c83c10a5c96d33bd18f98a4c06a1413134caa" +checksum = "0e56268c17a6248366d66d4a47a3381369d068cce8409bb1716ed77ea32163bb" dependencies = [ "cc", ] [[package]] name = "console" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dea0f3e2e8d7dba335e913b97f9e1992c86c4399d54f8be1d31c8727d0652064" +checksum = "8c0994e656bba7b922d8dd1245db90672ffb701e684e45be58f20719d69abc5a" dependencies = [ "encode_unicode", "lazy_static", @@ -678,9 +677,9 @@ dependencies = [ [[package]] name = "miow" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "396aa0f2003d7df8395cb93e09871561ccc3e785f0acb369170e8cc74ddf9226" +checksum = "22dfdd1d51b2639a5abd17ed07005c3af05fb7a2a3b1a1d0d7af1000a520c1c7" dependencies = [ "socket2", "winapi", @@ -863,9 +862,9 @@ checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" [[package]] name = "openssl-sys" -version = "0.9.56" +version = "0.9.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f02309a7f127000ed50594f0b50ecc69e7c654e16d41b4e8156d1b3df8e0b52e" +checksum = "7410fef80af8ac071d4f63755c0ab89ac3df0fd1ea91f1d1f37cf5cec4395990" dependencies = [ "autocfg", "cc", @@ -906,18 +905,18 @@ checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" [[package]] name = "pin-project" -version = "0.4.16" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81d480cb4e89522ccda96d0eed9af94180b7a5f93fb28f66e1fd7d68431663d1" +checksum = "edc93aeee735e60ecb40cf740eb319ff23eab1c5748abfdb5c180e4ce49f7791" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "0.4.16" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a82996f11efccb19b685b14b5df818de31c1edcee3daa256ab5775dd98e72feb" +checksum = "e58db2081ba5b4c93bd6be09c40fd36cb9193a8336c384f3b40012e531aa7e40" dependencies = [ "proc-macro2", "quote", @@ -968,9 +967,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.13" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53f5ffe53a6b28e37c9c1ce74893477864d64f74778a93a4beb43c8fa167f639" +checksum = "1502d12e458c49a4c9cbff560d0fe0060c252bc29799ed94ca2ed4bb665a0101" dependencies = [ "unicode-xid", ] @@ -1000,9 +999,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42934bc9c8ab0d3b273a16d8551c8f0fcff46be73276ca083ec2414c15c4ba5e" +checksum = "54a21852a652ad6f610c9510194f398ff6f8692e334fd1145fed931f7fbe44ea" dependencies = [ "proc-macro2", ] @@ -1225,9 +1224,9 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "syn" -version = "1.0.22" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1425de3c33b0941002740a420b1a906a350b88d08b82b2c8a01035a3f9447bac" +checksum = "f87bc5b2815ebb664de0392fdf1b95b6d10e160f86d9f64ff65e5679841ca06a" dependencies = [ "proc-macro2", "quote", @@ -1385,9 +1384,9 @@ checksum = "3fc439f2794e98976c88a2a2dafce96b930fe8010b0a256b3c2199a773933168" [[package]] name = "version_check" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce" +checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" [[package]] name = "void" diff --git a/Cargo.toml b/Cargo.toml index 6d19ae2..fe3cff5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,8 +5,8 @@ members = [ "aquatic_udp", "aquatic_udp_bench", "aquatic_udp_load_test", + "aquatic_udp_protocol", "aquatic_ws", - "bittorrent_udp", "cli_helpers", ] diff --git a/aquatic_udp/Cargo.toml b/aquatic_udp/Cargo.toml index 7d0f639..5ad50e9 100644 --- a/aquatic_udp/Cargo.toml +++ b/aquatic_udp/Cargo.toml @@ -15,7 +15,7 @@ name = "aquatic_udp" [dependencies] anyhow = "1" aquatic_common = { path = "../aquatic_common" } -bittorrent_udp = { path = "../bittorrent_udp" } +aquatic_udp_protocol = { path = "../aquatic_udp_protocol" } cli_helpers = { path = "../cli_helpers" } crossbeam-channel = "0.4" hashbrown = "0.7" diff --git a/aquatic_udp/src/lib/common.rs b/aquatic_udp/src/lib/common.rs index 31d3d7a..a36524a 100644 --- a/aquatic_udp/src/lib/common.rs +++ b/aquatic_udp/src/lib/common.rs @@ -6,7 +6,7 @@ use indexmap::IndexMap; use parking_lot::Mutex; pub use aquatic_common::ValidUntil; -pub use bittorrent_udp::types::*; +pub use aquatic_udp_protocol::types::*; pub const MAX_PACKET_SIZE: usize = 4096; diff --git a/aquatic_udp/src/lib/handlers.rs b/aquatic_udp/src/lib/handlers.rs index 6ba6868..b78b225 100644 --- a/aquatic_udp/src/lib/handlers.rs +++ b/aquatic_udp/src/lib/handlers.rs @@ -7,7 +7,7 @@ use parking_lot::MutexGuard; use rand::{SeedableRng, Rng, rngs::{SmallRng, StdRng}}; use aquatic_common::extract_response_peers; -use bittorrent_udp::types::*; +use aquatic_udp_protocol::types::*; use crate::common::*; use crate::config::Config; diff --git a/aquatic_udp/src/lib/network.rs b/aquatic_udp/src/lib/network.rs index f327d30..645510a 100644 --- a/aquatic_udp/src/lib/network.rs +++ b/aquatic_udp/src/lib/network.rs @@ -9,8 +9,8 @@ use mio::{Events, Poll, Interest, Token}; use mio::net::UdpSocket; use socket2::{Socket, Domain, Type, Protocol}; -use bittorrent_udp::types::IpVersion; -use bittorrent_udp::converters::{response_to_bytes, request_from_bytes}; +use aquatic_udp_protocol::types::IpVersion; +use aquatic_udp_protocol::converters::{response_to_bytes, request_from_bytes}; use crate::common::*; use crate::config::Config; diff --git a/aquatic_udp_bench/Cargo.toml b/aquatic_udp_bench/Cargo.toml index 03257cb..aa17288 100644 --- a/aquatic_udp_bench/Cargo.toml +++ b/aquatic_udp_bench/Cargo.toml @@ -17,7 +17,6 @@ name = "plot_pareto" [dependencies] anyhow = "1" aquatic_udp = { path = "../aquatic_udp" } -bittorrent_udp = { path = "../bittorrent_udp" } cli_helpers = { path = "../cli_helpers" } crossbeam-channel = "0.4" indicatif = "0.14" diff --git a/aquatic_udp_load_test/Cargo.toml b/aquatic_udp_load_test/Cargo.toml index 613d975..8750cb5 100644 --- a/aquatic_udp_load_test/Cargo.toml +++ b/aquatic_udp_load_test/Cargo.toml @@ -10,7 +10,7 @@ name = "aquatic_udp_load_test" [dependencies] anyhow = "1" -bittorrent_udp = { path = "../bittorrent_udp" } +aquatic_udp_protocol = { path = "../aquatic_udp_protocol" } cli_helpers = { path = "../cli_helpers" } crossbeam-channel = "0.4" hashbrown = "0.7" diff --git a/aquatic_udp_load_test/src/common.rs b/aquatic_udp_load_test/src/common.rs index 15e536b..42866f4 100644 --- a/aquatic_udp_load_test/src/common.rs +++ b/aquatic_udp_load_test/src/common.rs @@ -5,7 +5,7 @@ use hashbrown::HashMap; use parking_lot::Mutex; use serde::{Serialize, Deserialize}; -use bittorrent_udp::types::*; +use aquatic_udp_protocol::types::*; #[derive(Debug, PartialEq, Eq, Hash, Clone, Copy)] diff --git a/aquatic_udp_load_test/src/handler.rs b/aquatic_udp_load_test/src/handler.rs index 43b23b7..b0b0845 100644 --- a/aquatic_udp_load_test/src/handler.rs +++ b/aquatic_udp_load_test/src/handler.rs @@ -8,7 +8,7 @@ use rand::distributions::WeightedIndex; use rand::prelude::*; use rand_distr::Pareto; -use bittorrent_udp::types::*; +use aquatic_udp_protocol::types::*; use crate::common::*; use crate::utils::*; diff --git a/aquatic_udp_load_test/src/network.rs b/aquatic_udp_load_test/src/network.rs index 7a2b426..fc1c60f 100644 --- a/aquatic_udp_load_test/src/network.rs +++ b/aquatic_udp_load_test/src/network.rs @@ -7,8 +7,8 @@ use crossbeam_channel::{Receiver, Sender}; use mio::{net::UdpSocket, Events, Poll, Interest, Token}; use socket2::{Socket, Domain, Type, Protocol}; -use bittorrent_udp::converters::*; -use bittorrent_udp::types::*; +use aquatic_udp_protocol::converters::*; +use aquatic_udp_protocol::types::*; use crate::common::*; diff --git a/aquatic_udp_load_test/src/utils.rs b/aquatic_udp_load_test/src/utils.rs index f3a823d..48e25f1 100644 --- a/aquatic_udp_load_test/src/utils.rs +++ b/aquatic_udp_load_test/src/utils.rs @@ -3,7 +3,7 @@ use std::sync::Arc; use rand_distr::{Standard, Pareto}; use rand::prelude::*; -use bittorrent_udp::types::*; +use aquatic_udp_protocol::types::*; use crate::common::*; diff --git a/bittorrent_udp/Cargo.toml b/aquatic_udp_protocol/Cargo.toml similarity index 88% rename from bittorrent_udp/Cargo.toml rename to aquatic_udp_protocol/Cargo.toml index 53bb107..52be3fc 100644 --- a/bittorrent_udp/Cargo.toml +++ b/aquatic_udp_protocol/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "bittorrent_udp" +name = "aquatic_udp_protocol" version = "0.1.0" authors = ["Joakim FrostegÄrd "] edition = "2018" diff --git a/bittorrent_udp/src/converters/common.rs b/aquatic_udp_protocol/src/converters/common.rs similarity index 100% rename from bittorrent_udp/src/converters/common.rs rename to aquatic_udp_protocol/src/converters/common.rs diff --git a/bittorrent_udp/src/converters/mod.rs b/aquatic_udp_protocol/src/converters/mod.rs similarity index 100% rename from bittorrent_udp/src/converters/mod.rs rename to aquatic_udp_protocol/src/converters/mod.rs diff --git a/bittorrent_udp/src/converters/requests.rs b/aquatic_udp_protocol/src/converters/requests.rs similarity index 100% rename from bittorrent_udp/src/converters/requests.rs rename to aquatic_udp_protocol/src/converters/requests.rs diff --git a/bittorrent_udp/src/converters/responses.rs b/aquatic_udp_protocol/src/converters/responses.rs similarity index 100% rename from bittorrent_udp/src/converters/responses.rs rename to aquatic_udp_protocol/src/converters/responses.rs diff --git a/bittorrent_udp/src/lib.rs b/aquatic_udp_protocol/src/lib.rs similarity index 100% rename from bittorrent_udp/src/lib.rs rename to aquatic_udp_protocol/src/lib.rs diff --git a/bittorrent_udp/src/types/common.rs b/aquatic_udp_protocol/src/types/common.rs similarity index 100% rename from bittorrent_udp/src/types/common.rs rename to aquatic_udp_protocol/src/types/common.rs diff --git a/bittorrent_udp/src/types/mod.rs b/aquatic_udp_protocol/src/types/mod.rs similarity index 100% rename from bittorrent_udp/src/types/mod.rs rename to aquatic_udp_protocol/src/types/mod.rs diff --git a/bittorrent_udp/src/types/request.rs b/aquatic_udp_protocol/src/types/request.rs similarity index 100% rename from bittorrent_udp/src/types/request.rs rename to aquatic_udp_protocol/src/types/request.rs diff --git a/bittorrent_udp/src/types/response.rs b/aquatic_udp_protocol/src/types/response.rs similarity index 100% rename from bittorrent_udp/src/types/response.rs rename to aquatic_udp_protocol/src/types/response.rs