diff --git a/Cargo.lock b/Cargo.lock index 2d0f247..782b251 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -51,8 +51,8 @@ checksum = "224afbd727c3d6e4b90103ece64b8d1b67fbb1973b1046c2281eed3f3803f800" name = "app" version = "0.1.0" dependencies = [ - "common", "env_logger", + "gpcommon", "log", "serde", "serde_json", @@ -357,23 +357,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "common" -version = "0.1.0" -dependencies = [ - "async-trait", - "bytes", - "cc", - "data-encoding", - "log", - "ring", - "serde", - "serde_json", - "thiserror", - "tokio", - "tokio-util", -] - [[package]] name = "convert_case" version = "0.4.0" @@ -1101,16 +1084,33 @@ dependencies = [ name = "gpclient" version = "0.1.0" dependencies = [ - "common", + "gpcommon", "tokio", ] +[[package]] +name = "gpcommon" +version = "0.1.0" +dependencies = [ + "async-trait", + "bytes", + "cc", + "data-encoding", + "log", + "ring", + "serde", + "serde_json", + "thiserror", + "tokio", + "tokio-util", +] + [[package]] name = "gpservice" version = "0.1.0" dependencies = [ - "common", "env_logger", + "gpcommon", "log", "tokio", ] diff --git a/Cargo.toml b/Cargo.toml index 9fda31e..b98cf98 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [workspace] members = [ - "common", + "gpcommon", "gpclient", "gpservice", "gpauth", diff --git a/gpclient/Cargo.toml b/gpclient/Cargo.toml index b999530..9419e0a 100644 --- a/gpclient/Cargo.toml +++ b/gpclient/Cargo.toml @@ -6,5 +6,5 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -common = { path = "../common" } +gpcommon = { path = "../gpcommon" } tokio = { version = "1.0", features = ["full"] } diff --git a/gpclient/src/main.rs b/gpclient/src/main.rs index 109ffcc..36e2077 100644 --- a/gpclient/src/main.rs +++ b/gpclient/src/main.rs @@ -1,4 +1,4 @@ -use common::{Client, SOCKET_PATH}; +use gpcommon::{Client, SOCKET_PATH}; use tokio::{io::AsyncReadExt, net::UnixStream, sync::mpsc}; #[tokio::main] diff --git a/common/.gitignore b/gpcommon/.gitignore similarity index 100% rename from common/.gitignore rename to gpcommon/.gitignore diff --git a/common/Cargo.toml b/gpcommon/Cargo.toml similarity index 95% rename from common/Cargo.toml rename to gpcommon/Cargo.toml index 6c406dc..e2fbe34 100644 --- a/common/Cargo.toml +++ b/gpcommon/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "common" +name = "gpcommon" version = "0.1.0" edition = "2021" diff --git a/common/build.rs b/gpcommon/build.rs similarity index 100% rename from common/build.rs rename to gpcommon/build.rs diff --git a/common/src/client.rs b/gpcommon/src/client.rs similarity index 100% rename from common/src/client.rs rename to gpcommon/src/client.rs diff --git a/common/src/cmd/connect.rs b/gpcommon/src/cmd/connect.rs similarity index 100% rename from common/src/cmd/connect.rs rename to gpcommon/src/cmd/connect.rs diff --git a/common/src/cmd/disconnect.rs b/gpcommon/src/cmd/disconnect.rs similarity index 100% rename from common/src/cmd/disconnect.rs rename to gpcommon/src/cmd/disconnect.rs diff --git a/common/src/cmd/mod.rs b/gpcommon/src/cmd/mod.rs similarity index 100% rename from common/src/cmd/mod.rs rename to gpcommon/src/cmd/mod.rs diff --git a/common/src/cmd/status.rs b/gpcommon/src/cmd/status.rs similarity index 100% rename from common/src/cmd/status.rs rename to gpcommon/src/cmd/status.rs diff --git a/common/src/connection.rs b/gpcommon/src/connection.rs similarity index 100% rename from common/src/connection.rs rename to gpcommon/src/connection.rs diff --git a/common/src/lib.rs b/gpcommon/src/lib.rs similarity index 100% rename from common/src/lib.rs rename to gpcommon/src/lib.rs diff --git a/common/src/reader.rs b/gpcommon/src/reader.rs similarity index 100% rename from common/src/reader.rs rename to gpcommon/src/reader.rs diff --git a/common/src/request.rs b/gpcommon/src/request.rs similarity index 100% rename from common/src/request.rs rename to gpcommon/src/request.rs diff --git a/common/src/response.rs b/gpcommon/src/response.rs similarity index 100% rename from common/src/response.rs rename to gpcommon/src/response.rs diff --git a/common/src/server.rs b/gpcommon/src/server.rs similarity index 100% rename from common/src/server.rs rename to gpcommon/src/server.rs diff --git a/common/src/vpn/ffi.rs b/gpcommon/src/vpn/ffi.rs similarity index 100% rename from common/src/vpn/ffi.rs rename to gpcommon/src/vpn/ffi.rs diff --git a/common/src/vpn/mod.rs b/gpcommon/src/vpn/mod.rs similarity index 100% rename from common/src/vpn/mod.rs rename to gpcommon/src/vpn/mod.rs diff --git a/common/src/vpn/vpn.c b/gpcommon/src/vpn/vpn.c similarity index 100% rename from common/src/vpn/vpn.c rename to gpcommon/src/vpn/vpn.c diff --git a/common/src/vpn/vpn.h b/gpcommon/src/vpn/vpn.h similarity index 100% rename from common/src/vpn/vpn.h rename to gpcommon/src/vpn/vpn.h diff --git a/common/src/writer.rs b/gpcommon/src/writer.rs similarity index 100% rename from common/src/writer.rs rename to gpcommon/src/writer.rs diff --git a/gpgui/src-tauri/Cargo.toml b/gpgui/src-tauri/Cargo.toml index 6a9c9df..c8c086b 100644 --- a/gpgui/src-tauri/Cargo.toml +++ b/gpgui/src-tauri/Cargo.toml @@ -21,7 +21,7 @@ serde_json = "1.0" serde = { version = "1.0", features = ["derive"] } log = "0.4" env_logger = "0.10" -common = { path = "../../common" } +gpcommon = { path = "../../gpcommon" } [features] # by default Tauri runs in production mode diff --git a/gpgui/src-tauri/src/main.rs b/gpgui/src-tauri/src/main.rs index f289c49..8dae445 100644 --- a/gpgui/src-tauri/src/main.rs +++ b/gpgui/src-tauri/src/main.rs @@ -3,7 +3,7 @@ windows_subsystem = "windows" )] -use common::{Client, ServerApiError, VpnStatus}; +use gpcommon::{Client, ServerApiError, VpnStatus}; use env_logger::Env; use serde::Serialize; use std::sync::Arc; diff --git a/gpservice/Cargo.toml b/gpservice/Cargo.toml index 48bc724..b55bc49 100644 --- a/gpservice/Cargo.toml +++ b/gpservice/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -common = { path = "../common" } +gpcommon = { path = "../gpcommon" } tokio = { version = "1", features = ["full"] } env_logger = "0.10" log = "0.4" @@ -15,4 +15,4 @@ log = "0.4" # procfs = "0.15" [build-dependencies] -common = { path = "../common" } +gpcommon = { path = "../gpcommon" } diff --git a/gpservice/build.rs b/gpservice/build.rs index e590261..4e4fdf9 100644 --- a/gpservice/build.rs +++ b/gpservice/build.rs @@ -1,4 +1,4 @@ -use common::sha256_digest; +use gpcommon::sha256_digest; use std::path::Path; use std::{env, fs}; diff --git a/gpservice/src/main.rs b/gpservice/src/main.rs index e62a2a1..0bb3d53 100644 --- a/gpservice/src/main.rs +++ b/gpservice/src/main.rs @@ -1,7 +1,7 @@ include!(concat!(env!("OUT_DIR"), "/client_hash.rs")); // use aes_gcm::{aead::OsRng, Aes256Gcm, KeyInit}; -use common::{server, SOCKET_PATH}; +use gpcommon::{server, SOCKET_PATH}; use env_logger::Env; use log::error; use tokio::signal;