diff --git a/Cargo.toml b/Cargo.toml index 4949cc1..8d74403 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,34 +1,6 @@ -[package] -name = "gamedig" -version = "0.4.1" -edition = "2021" -authors = [ - "rust-GameDig contributors [https://github.com/gamedig/rust-gamedig/contributors]", - "node-GameDig contributors [https://github.com/gamedig/node-gamedig/contributors]", -] -license = "MIT" -description = "Query game servers and not only." -homepage = "https://github.com/gamedig/rust-gamedig" -documentation = "https://docs.rs/gamedig/latest/gamedig/" -repository = "https://github.com/gamedig/rust-gamedig" -readme = "README.md" -keywords = ["server", "query", "game", "check", "status"] -rust-version = "1.65.0" -categories = ["parser-implementations", "parsing", "network-programming", "encoding"] - -[features] -default = ["games", "services", "game_defs"] -games = [] -services = [] -game_defs = ["dep:phf", "games"] -serde = ["dep:serde", "serde/derive"] - -[dependencies] -byteorder = "1.5" -bzip2-rs = "0.1" -crc32fast = "1.3" -serde_json = "1.0" - -serde = { version = "1.0", optional = true } - -phf = { version = "0.11", optional = true, features = ["macros"] } +[workspace] +name = "gamedig-workspace" +members = [ + "crates/cli", + "crates/lib", +] \ No newline at end of file diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml new file mode 100644 index 0000000..a93c1b5 --- /dev/null +++ b/crates/cli/Cargo.toml @@ -0,0 +1,22 @@ +[package] +name = "gamedig-cli" +authors = ["rust-GameDig contributors [https://github.com/gamedig/rust-gamedig/contributors]"] +description = "A command line interface for gamedig" +license = "MIT" +version = "0.4.1" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +clap = { version = "4.1.11", features = ["derive"] } +gamedig = { version = "*", path = "../lib" } +strum = "0.25.0" +strum_macros = "0.24.3" +thiserror = "1.0.43" + +[profile.release] +opt-level = 3 +debug = false +rpath = true +lto = true \ No newline at end of file diff --git a/crates/cli/src/error.rs b/crates/cli/src/error.rs new file mode 100644 index 0000000..882de15 --- /dev/null +++ b/crates/cli/src/error.rs @@ -0,0 +1,16 @@ +pub type Result = std::result::Result; + +#[derive(thiserror::Error, Debug)] +pub enum Error { + #[error("IO Error: {0}")] + Io(#[from] std::io::Error), + + #[error("Clap Error: {0}")] + Clap(#[from] clap::Error), + + #[error("Gamedig Error: {0}")] + Gamedig(#[from] gamedig::errors::GDError), + + #[error("Strum Error: {0}")] + Strum(#[from] strum::ParseError), +} \ No newline at end of file diff --git a/crates/cli/src/key.rs b/crates/cli/src/key.rs new file mode 100644 index 0000000..a1c19ba --- /dev/null +++ b/crates/cli/src/key.rs @@ -0,0 +1,93 @@ +use strum_macros::{Display, EnumString}; + +#[derive(EnumString, Display, Debug, Clone)] +pub enum Game { + #[strum(serialize = "aliens")] + AlienSwarm, + #[strum(serialize = "aoc")] + AgeOfChivalry, + #[strum(serialize = "arma2oa")] + ARMA2OperationArrowhead, + #[strum(serialize = "ase")] + ARKSurvivalEvolved, + #[strum(serialize = "asrd")] + AlienSwarmReactiveDrop, + #[strum(serialize = "avorion")] + Avorion, + #[strum(serialize = "bat1944")] + Battalion1944, + #[strum(serialize = "bb2")] + BrainBread2, + #[strum(serialize = "bf1942")] + Battlefield1942, + #[strum(serialize = "bm")] + BlackMesa, + #[strum(serialize = "bo")] + BallisticOverkill, + #[strum(serialize = "ccure")] + CodenameCURE, + #[strum(serialize = "cosu")] + ColonySurvival, + #[strum(serialize = "cs")] + CounterStrike, + #[strum(serialize = "cscz")] + CounterStrikeConditionZero, + #[strum(serialize = "csgo")] + CounterStrikeGlobalOffensive, + #[strum(serialize = "css")] + CounterStrikeSource, + #[strum(serialize = "dod")] + DayOfDefeat, + #[strum(serialize = "dods")] + DayOfDefeatSource, + #[strum(serialize = "doi")] + DayOfInfamy, + #[strum(serialize = "dst")] + DontStarveTogether, + #[strum(serialize = "gm")] + GarrysMod, + #[strum(serialize = "hl2dm")] + HalfLife2Deathmatch, + #[strum(serialize = "hldms")] + HalfLifeDeathmatchSource, + #[strum(serialize = "ins")] + Insurgency, + #[strum(serialize = "insmic")] + InsurgencyModernInfantryCombat, + #[strum(serialize = "inss")] + InsurgencySandstorm, + #[strum(serialize = "l4d")] + Left4Dead, + #[strum(serialize = "l4d2")] + Left4Dead2, + #[strum(serialize = "mc")] + Minecraft, + #[strum(serialize = "ohd")] + OperationHarshDoorstop, + #[strum(serialize = "onset")] + Onset, + #[strum(serialize = "pz")] + ProjectZomboid, + #[strum(serialize = "ror2")] + RiskOfRain2, + #[strum(serialize = "rust")] + Rust, + #[strum(serialize = "sc")] + SvenCoOp, + #[strum(serialize = "sdtd")] + SevenDaysToDie, + #[strum(serialize = "tf")] + TeamFortress, + #[strum(serialize = "tf2")] + TeamFortress2, + #[strum(serialize = "tfc")] + TeamFortressClassic, + #[strum(serialize = "ts")] + TheShip, + #[strum(serialize = "unturned")] + Unturned, + #[strum(serialize = "ut")] + UnrealTournament, + #[strum(serialize = "vr")] + VRising, +} \ No newline at end of file diff --git a/crates/cli/src/main.rs b/crates/cli/src/main.rs new file mode 100644 index 0000000..479ecfb --- /dev/null +++ b/crates/cli/src/main.rs @@ -0,0 +1,73 @@ +mod error; +mod key; + +use self::{error::Result, key::Game}; + +use clap::Parser; +use gamedig::games::*; + +#[derive(Parser)] +#[command(author, version, about)] +struct Cli { + #[arg(short, long)] + game: Game, + + #[arg(short, long)] + ip: String, + + #[arg(short, long)] + port: u16, +} + +#[rustfmt::skip] +fn main() -> Result<()> { + let args = Cli::parse(); + + match args.game { + Game::AlienSwarm => Ok(println!("{:#?}", aliens::query(&args.ip, Some(args.port))?)), + Game::AgeOfChivalry => Ok(println!("{:#?}", aoc::query(&args.ip, Some(args.port))?)), + Game::ARMA2OperationArrowhead => Ok(println!("{:#?}", arma2oa::query(&args.ip, Some(args.port))?)), + Game::ARKSurvivalEvolved => Ok(println!("{:#?}", ase::query(&args.ip, Some(args.port))?)), + Game::AlienSwarmReactiveDrop => Ok(println!("{:#?}", asrd::query(&args.ip, Some(args.port))?)), + Game::Avorion => Ok(println!("{:#?}", avorion::query(&args.ip, Some(args.port))?)), + Game::Battalion1944 => Ok(println!("{:#?}", bat1944::query(&args.ip, Some(args.port))?)), + Game::BrainBread2 => Ok(println!("{:#?}", bb2::query(&args.ip, Some(args.port))?)), + Game::Battlefield1942 => Ok(println!("{:#?}", bf1942::query(&args.ip, Some(args.port))?)), + Game::BlackMesa => Ok(println!("{:#?}", bm::query(&args.ip, Some(args.port))?)), + Game::BallisticOverkill => Ok(println!("{:#?}", bo::query(&args.ip, Some(args.port))?)), + Game::CodenameCURE => Ok(println!("{:#?}", ccure::query(&args.ip, Some(args.port))?)), + Game::ColonySurvival => Ok(println!("{:#?}", cosu::query(&args.ip, Some(args.port))?)), + Game::CounterStrike => Ok(println!("{:#?}", cs::query(&args.ip, Some(args.port))?)), + Game::CounterStrikeConditionZero => Ok(println!("{:#?}", cscz::query(&args.ip, Some(args.port))?)), + Game::CounterStrikeGlobalOffensive => Ok(println!("{:#?}", csgo::query(&args.ip, Some(args.port))?)), + Game::CounterStrikeSource => Ok(println!("{:#?}", css::query(&args.ip, Some(args.port))?)), + Game::DayOfDefeat => Ok(println!("{:#?}", dod::query(&args.ip, Some(args.port))?)), + Game::DayOfDefeatSource => Ok(println!("{:#?}", dods::query(&args.ip, Some(args.port))?)), + Game::DayOfInfamy => Ok(println!("{:#?}", doi::query(&args.ip, Some(args.port))?)), + Game::DontStarveTogether => Ok(println!("{:#?}", dst::query(&args.ip, Some(args.port))?)), + Game::GarrysMod => Ok(println!("{:#?}", gm::query(&args.ip, Some(args.port))?)), + Game::HalfLife2Deathmatch => Ok(println!("{:#?}", hl2dm::query(&args.ip, Some(args.port))?)), + Game::HalfLifeDeathmatchSource => Ok(println!("{:#?}", hldms::query(&args.ip, Some(args.port))?)), + Game::Insurgency => Ok(println!("{:#?}", ins::query(&args.ip, Some(args.port))?)), + Game::InsurgencyModernInfantryCombat => Ok(println!("{:#?}", insmic::query(&args.ip, Some(args.port))?)), + Game::InsurgencySandstorm => Ok(println!("{:#?}", inss::query(&args.ip, Some(args.port))?)), + Game::Left4Dead => Ok(println!("{:#?}", l4d::query(&args.ip, Some(args.port))?)), + Game::Left4Dead2 => Ok(println!("{:#?}", l4d2::query(&args.ip, Some(args.port))?)), + Game::Minecraft => Ok(println!("{:#?}", mc::query(&args.ip, Some(args.port))?)), + Game::OperationHarshDoorstop => Ok(println!("{:#?}", ohd::query(&args.ip, Some(args.port))?)), + Game::Onset => Ok(println!("{:#?}", onset::query(&args.ip, Some(args.port))?)), + Game::ProjectZomboid => Ok(println!("{:#?}", pz::query(&args.ip, Some(args.port))?)), + Game::RiskOfRain2 => Ok(println!("{:#?}", ror2::query(&args.ip, Some(args.port))?)), + Game::Rust => Ok(println!("{:#?}", rust::query(&args.ip, Some(args.port))?)), + Game::SvenCoOp => Ok(println!("{:#?}", sc::query(&args.ip, Some(args.port))?)), + Game::SevenDaysToDie => Ok(println!("{:#?}", sdtd::query(&args.ip, Some(args.port))?)), + Game::TeamFortress => Ok(println!("{:#?}", tf::query(&args.ip, Some(args.port))?)), + Game::TeamFortress2 => Ok(println!("{:#?}", tf2::query(&args.ip, Some(args.port))?)), + Game::TeamFortressClassic => Ok(println!("{:#?}", tfc::query(&args.ip, Some(args.port))?)), + Game::TheShip => Ok(println!("{:#?}", ts::query(&args.ip, Some(args.port))?)), + Game::Unturned => Ok(println!("{:#?}", unturned::query(&args.ip, Some(args.port))?)), + Game::UnrealTournament => Ok(println!("{:#?}", ut::query(&args.ip, Some(args.port))?)), + Game::VRising => Ok(println!("{:#?}", vr::query(&args.ip, Some(args.port))?)), + + } +} \ No newline at end of file diff --git a/crates/lib/Cargo.toml b/crates/lib/Cargo.toml new file mode 100644 index 0000000..4949cc1 --- /dev/null +++ b/crates/lib/Cargo.toml @@ -0,0 +1,34 @@ +[package] +name = "gamedig" +version = "0.4.1" +edition = "2021" +authors = [ + "rust-GameDig contributors [https://github.com/gamedig/rust-gamedig/contributors]", + "node-GameDig contributors [https://github.com/gamedig/node-gamedig/contributors]", +] +license = "MIT" +description = "Query game servers and not only." +homepage = "https://github.com/gamedig/rust-gamedig" +documentation = "https://docs.rs/gamedig/latest/gamedig/" +repository = "https://github.com/gamedig/rust-gamedig" +readme = "README.md" +keywords = ["server", "query", "game", "check", "status"] +rust-version = "1.65.0" +categories = ["parser-implementations", "parsing", "network-programming", "encoding"] + +[features] +default = ["games", "services", "game_defs"] +games = [] +services = [] +game_defs = ["dep:phf", "games"] +serde = ["dep:serde", "serde/derive"] + +[dependencies] +byteorder = "1.5" +bzip2-rs = "0.1" +crc32fast = "1.3" +serde_json = "1.0" + +serde = { version = "1.0", optional = true } + +phf = { version = "0.11", optional = true, features = ["macros"] } diff --git a/examples/generic.rs b/crates/lib/examples/generic.rs similarity index 100% rename from examples/generic.rs rename to crates/lib/examples/generic.rs diff --git a/examples/minecraft.rs b/crates/lib/examples/minecraft.rs similarity index 100% rename from examples/minecraft.rs rename to crates/lib/examples/minecraft.rs diff --git a/examples/teamfortress2.rs b/crates/lib/examples/teamfortress2.rs similarity index 100% rename from examples/teamfortress2.rs rename to crates/lib/examples/teamfortress2.rs diff --git a/examples/valve_master_server_query.rs b/crates/lib/examples/valve_master_server_query.rs similarity index 100% rename from examples/valve_master_server_query.rs rename to crates/lib/examples/valve_master_server_query.rs diff --git a/src/buffer.rs b/crates/lib/src/buffer.rs similarity index 100% rename from src/buffer.rs rename to crates/lib/src/buffer.rs diff --git a/src/errors/error.rs b/crates/lib/src/errors/error.rs similarity index 100% rename from src/errors/error.rs rename to crates/lib/src/errors/error.rs diff --git a/src/errors/kind.rs b/crates/lib/src/errors/kind.rs similarity index 100% rename from src/errors/kind.rs rename to crates/lib/src/errors/kind.rs diff --git a/src/errors/mod.rs b/crates/lib/src/errors/mod.rs similarity index 100% rename from src/errors/mod.rs rename to crates/lib/src/errors/mod.rs diff --git a/src/errors/result.rs b/crates/lib/src/errors/result.rs similarity index 100% rename from src/errors/result.rs rename to crates/lib/src/errors/result.rs diff --git a/src/games/battalion1944.rs b/crates/lib/src/games/battalion1944.rs similarity index 100% rename from src/games/battalion1944.rs rename to crates/lib/src/games/battalion1944.rs diff --git a/src/games/definitions.rs b/crates/lib/src/games/definitions.rs similarity index 100% rename from src/games/definitions.rs rename to crates/lib/src/games/definitions.rs diff --git a/src/games/ffow.rs b/crates/lib/src/games/ffow.rs similarity index 100% rename from src/games/ffow.rs rename to crates/lib/src/games/ffow.rs diff --git a/src/games/gamespy.rs b/crates/lib/src/games/gamespy.rs similarity index 100% rename from src/games/gamespy.rs rename to crates/lib/src/games/gamespy.rs diff --git a/src/games/jc2m.rs b/crates/lib/src/games/jc2m.rs similarity index 100% rename from src/games/jc2m.rs rename to crates/lib/src/games/jc2m.rs diff --git a/src/games/minecraft.rs b/crates/lib/src/games/minecraft.rs similarity index 100% rename from src/games/minecraft.rs rename to crates/lib/src/games/minecraft.rs diff --git a/src/games/mod.rs b/crates/lib/src/games/mod.rs similarity index 100% rename from src/games/mod.rs rename to crates/lib/src/games/mod.rs diff --git a/src/games/quake.rs b/crates/lib/src/games/quake.rs similarity index 100% rename from src/games/quake.rs rename to crates/lib/src/games/quake.rs diff --git a/src/games/theship.rs b/crates/lib/src/games/theship.rs similarity index 100% rename from src/games/theship.rs rename to crates/lib/src/games/theship.rs diff --git a/src/games/valve.rs b/crates/lib/src/games/valve.rs similarity index 100% rename from src/games/valve.rs rename to crates/lib/src/games/valve.rs diff --git a/src/lib.rs b/crates/lib/src/lib.rs similarity index 100% rename from src/lib.rs rename to crates/lib/src/lib.rs diff --git a/src/protocols/gamespy/common.rs b/crates/lib/src/protocols/gamespy/common.rs similarity index 100% rename from src/protocols/gamespy/common.rs rename to crates/lib/src/protocols/gamespy/common.rs diff --git a/src/protocols/gamespy/mod.rs b/crates/lib/src/protocols/gamespy/mod.rs similarity index 100% rename from src/protocols/gamespy/mod.rs rename to crates/lib/src/protocols/gamespy/mod.rs diff --git a/src/protocols/gamespy/protocols/mod.rs b/crates/lib/src/protocols/gamespy/protocols/mod.rs similarity index 100% rename from src/protocols/gamespy/protocols/mod.rs rename to crates/lib/src/protocols/gamespy/protocols/mod.rs diff --git a/src/protocols/gamespy/protocols/one/mod.rs b/crates/lib/src/protocols/gamespy/protocols/one/mod.rs similarity index 100% rename from src/protocols/gamespy/protocols/one/mod.rs rename to crates/lib/src/protocols/gamespy/protocols/one/mod.rs diff --git a/src/protocols/gamespy/protocols/one/protocol.rs b/crates/lib/src/protocols/gamespy/protocols/one/protocol.rs similarity index 100% rename from src/protocols/gamespy/protocols/one/protocol.rs rename to crates/lib/src/protocols/gamespy/protocols/one/protocol.rs diff --git a/src/protocols/gamespy/protocols/one/types.rs b/crates/lib/src/protocols/gamespy/protocols/one/types.rs similarity index 100% rename from src/protocols/gamespy/protocols/one/types.rs rename to crates/lib/src/protocols/gamespy/protocols/one/types.rs diff --git a/src/protocols/gamespy/protocols/three/mod.rs b/crates/lib/src/protocols/gamespy/protocols/three/mod.rs similarity index 100% rename from src/protocols/gamespy/protocols/three/mod.rs rename to crates/lib/src/protocols/gamespy/protocols/three/mod.rs diff --git a/src/protocols/gamespy/protocols/three/protocol.rs b/crates/lib/src/protocols/gamespy/protocols/three/protocol.rs similarity index 100% rename from src/protocols/gamespy/protocols/three/protocol.rs rename to crates/lib/src/protocols/gamespy/protocols/three/protocol.rs diff --git a/src/protocols/gamespy/protocols/three/types.rs b/crates/lib/src/protocols/gamespy/protocols/three/types.rs similarity index 100% rename from src/protocols/gamespy/protocols/three/types.rs rename to crates/lib/src/protocols/gamespy/protocols/three/types.rs diff --git a/src/protocols/gamespy/protocols/two/mod.rs b/crates/lib/src/protocols/gamespy/protocols/two/mod.rs similarity index 100% rename from src/protocols/gamespy/protocols/two/mod.rs rename to crates/lib/src/protocols/gamespy/protocols/two/mod.rs diff --git a/src/protocols/gamespy/protocols/two/protocol.rs b/crates/lib/src/protocols/gamespy/protocols/two/protocol.rs similarity index 100% rename from src/protocols/gamespy/protocols/two/protocol.rs rename to crates/lib/src/protocols/gamespy/protocols/two/protocol.rs diff --git a/src/protocols/gamespy/protocols/two/types.rs b/crates/lib/src/protocols/gamespy/protocols/two/types.rs similarity index 100% rename from src/protocols/gamespy/protocols/two/types.rs rename to crates/lib/src/protocols/gamespy/protocols/two/types.rs diff --git a/src/protocols/minecraft/mod.rs b/crates/lib/src/protocols/minecraft/mod.rs similarity index 100% rename from src/protocols/minecraft/mod.rs rename to crates/lib/src/protocols/minecraft/mod.rs diff --git a/src/protocols/minecraft/protocol/bedrock.rs b/crates/lib/src/protocols/minecraft/protocol/bedrock.rs similarity index 100% rename from src/protocols/minecraft/protocol/bedrock.rs rename to crates/lib/src/protocols/minecraft/protocol/bedrock.rs diff --git a/src/protocols/minecraft/protocol/java.rs b/crates/lib/src/protocols/minecraft/protocol/java.rs similarity index 100% rename from src/protocols/minecraft/protocol/java.rs rename to crates/lib/src/protocols/minecraft/protocol/java.rs diff --git a/src/protocols/minecraft/protocol/legacy_v1_3.rs b/crates/lib/src/protocols/minecraft/protocol/legacy_v1_3.rs similarity index 100% rename from src/protocols/minecraft/protocol/legacy_v1_3.rs rename to crates/lib/src/protocols/minecraft/protocol/legacy_v1_3.rs diff --git a/src/protocols/minecraft/protocol/legacy_v1_5.rs b/crates/lib/src/protocols/minecraft/protocol/legacy_v1_5.rs similarity index 100% rename from src/protocols/minecraft/protocol/legacy_v1_5.rs rename to crates/lib/src/protocols/minecraft/protocol/legacy_v1_5.rs diff --git a/src/protocols/minecraft/protocol/legacy_v1_6.rs b/crates/lib/src/protocols/minecraft/protocol/legacy_v1_6.rs similarity index 100% rename from src/protocols/minecraft/protocol/legacy_v1_6.rs rename to crates/lib/src/protocols/minecraft/protocol/legacy_v1_6.rs diff --git a/src/protocols/minecraft/protocol/mod.rs b/crates/lib/src/protocols/minecraft/protocol/mod.rs similarity index 100% rename from src/protocols/minecraft/protocol/mod.rs rename to crates/lib/src/protocols/minecraft/protocol/mod.rs diff --git a/src/protocols/minecraft/types.rs b/crates/lib/src/protocols/minecraft/types.rs similarity index 100% rename from src/protocols/minecraft/types.rs rename to crates/lib/src/protocols/minecraft/types.rs diff --git a/src/protocols/mod.rs b/crates/lib/src/protocols/mod.rs similarity index 100% rename from src/protocols/mod.rs rename to crates/lib/src/protocols/mod.rs diff --git a/src/protocols/quake/client.rs b/crates/lib/src/protocols/quake/client.rs similarity index 100% rename from src/protocols/quake/client.rs rename to crates/lib/src/protocols/quake/client.rs diff --git a/src/protocols/quake/mod.rs b/crates/lib/src/protocols/quake/mod.rs similarity index 100% rename from src/protocols/quake/mod.rs rename to crates/lib/src/protocols/quake/mod.rs diff --git a/src/protocols/quake/one.rs b/crates/lib/src/protocols/quake/one.rs similarity index 100% rename from src/protocols/quake/one.rs rename to crates/lib/src/protocols/quake/one.rs diff --git a/src/protocols/quake/three.rs b/crates/lib/src/protocols/quake/three.rs similarity index 100% rename from src/protocols/quake/three.rs rename to crates/lib/src/protocols/quake/three.rs diff --git a/src/protocols/quake/two.rs b/crates/lib/src/protocols/quake/two.rs similarity index 100% rename from src/protocols/quake/two.rs rename to crates/lib/src/protocols/quake/two.rs diff --git a/src/protocols/quake/types.rs b/crates/lib/src/protocols/quake/types.rs similarity index 100% rename from src/protocols/quake/types.rs rename to crates/lib/src/protocols/quake/types.rs diff --git a/src/protocols/types.rs b/crates/lib/src/protocols/types.rs similarity index 100% rename from src/protocols/types.rs rename to crates/lib/src/protocols/types.rs diff --git a/src/protocols/valve/mod.rs b/crates/lib/src/protocols/valve/mod.rs similarity index 100% rename from src/protocols/valve/mod.rs rename to crates/lib/src/protocols/valve/mod.rs diff --git a/src/protocols/valve/protocol.rs b/crates/lib/src/protocols/valve/protocol.rs similarity index 100% rename from src/protocols/valve/protocol.rs rename to crates/lib/src/protocols/valve/protocol.rs diff --git a/src/protocols/valve/types.rs b/crates/lib/src/protocols/valve/types.rs similarity index 100% rename from src/protocols/valve/types.rs rename to crates/lib/src/protocols/valve/types.rs diff --git a/src/services/mod.rs b/crates/lib/src/services/mod.rs similarity index 100% rename from src/services/mod.rs rename to crates/lib/src/services/mod.rs diff --git a/src/services/valve_master_server/mod.rs b/crates/lib/src/services/valve_master_server/mod.rs similarity index 100% rename from src/services/valve_master_server/mod.rs rename to crates/lib/src/services/valve_master_server/mod.rs diff --git a/src/services/valve_master_server/service.rs b/crates/lib/src/services/valve_master_server/service.rs similarity index 100% rename from src/services/valve_master_server/service.rs rename to crates/lib/src/services/valve_master_server/service.rs diff --git a/src/services/valve_master_server/types.rs b/crates/lib/src/services/valve_master_server/types.rs similarity index 100% rename from src/services/valve_master_server/types.rs rename to crates/lib/src/services/valve_master_server/types.rs diff --git a/src/socket.rs b/crates/lib/src/socket.rs similarity index 100% rename from src/socket.rs rename to crates/lib/src/socket.rs diff --git a/src/utils.rs b/crates/lib/src/utils.rs similarity index 100% rename from src/utils.rs rename to crates/lib/src/utils.rs