From 25ca3f4be633ac4d31d08aa5f677b52c707e6bc8 Mon Sep 17 00:00:00 2001 From: Hubert Date: Sun, 26 Jun 2022 12:13:12 +0200 Subject: [PATCH] use workspaces to reduce dependencies (#7) * use workspaces to reduce dependencies * bump version --- Cargo.toml | 23 +++++------------------ README.md | 4 +--- wakey-wake/Cargo.toml | 17 +++++++++++++++++ src/bin/wake.rs => wakey-wake/src/main.rs | 0 wakey/Cargo.toml | 17 +++++++++++++++++ {src => wakey/src}/lib.rs | 0 6 files changed, 40 insertions(+), 21 deletions(-) create mode 100644 wakey-wake/Cargo.toml rename src/bin/wake.rs => wakey-wake/src/main.rs (100%) create mode 100644 wakey/Cargo.toml rename {src => wakey/src}/lib.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index db8ed18..707074b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,18 +1,5 @@ -[package] -name = "wakey" -version = "0.2.1" - -authors = ["Hubert Bugaj"] -edition = "2021" - -license = "MIT" -repository = "https://github.com/LesnyRumcajs/wakey" - -description = "Wake-on-LAN library for creating and sending magic WOL packets." -keywords = ["wol", "wake-on-lan"] -categories = ["network-programming"] - -[dependencies] -hex = "~0.3" -arrayvec = "0.7.2" -clap = { version = "3.1.18", features = ["derive"] } +[workspace] +members = [ + "wakey", + "wakey-wake" +] diff --git a/README.md b/README.md index a5d7481..2ffed91 100644 --- a/README.md +++ b/README.md @@ -32,8 +32,6 @@ wol.send_magic_to(src, dst); ## Included binary -The binary `bin/wake` may be directly used in scripts: - ``` -wake -m 00:11:22:33:44:55 +cargo run --bin wakey-wake -m 00:11:22:33:44:55 ``` diff --git a/wakey-wake/Cargo.toml b/wakey-wake/Cargo.toml new file mode 100644 index 0000000..ba22086 --- /dev/null +++ b/wakey-wake/Cargo.toml @@ -0,0 +1,17 @@ +[package] +name = "wakey-wake" +version = "0.2.2" + +authors = ["Hubert Bugaj"] +edition = "2021" + +license = "MIT" +repository = "https://github.com/LesnyRumcajs/wakey" + +description = "Sample CLI tool for creating and sending Wake-on-LAN packets." +keywords = ["wol", "wake-on-lan"] +categories = ["network-programming"] + +[dependencies] +wakey = { path = "../wakey" } +clap = { version = "3.1.18", features = ["derive"] } diff --git a/src/bin/wake.rs b/wakey-wake/src/main.rs similarity index 100% rename from src/bin/wake.rs rename to wakey-wake/src/main.rs diff --git a/wakey/Cargo.toml b/wakey/Cargo.toml new file mode 100644 index 0000000..53cf755 --- /dev/null +++ b/wakey/Cargo.toml @@ -0,0 +1,17 @@ +[package] +name = "wakey" +version = "0.2.2" + +authors = ["Hubert Bugaj"] +edition = "2021" + +license = "MIT" +repository = "https://github.com/LesnyRumcajs/wakey" + +description = "Wake-on-LAN library for creating and sending magic WOL packets." +keywords = ["wol", "wake-on-lan"] +categories = ["network-programming"] + +[dependencies] +hex = "~0.3" +arrayvec = "0.7.2" diff --git a/src/lib.rs b/wakey/src/lib.rs similarity index 100% rename from src/lib.rs rename to wakey/src/lib.rs