From eeb25897df73c0a884657e131774ab3cbd89b8bd Mon Sep 17 00:00:00 2001 From: ShootingStarDragons Date: Tue, 19 Dec 2023 09:51:42 +0800 Subject: [PATCH] feat: use workspace package control global values --- Cargo.lock | 4 ++-- Cargo.toml | 19 +++++++++++++++---- libwayshot/Cargo.toml | 17 +++++++++-------- wayshot/Cargo.toml | 33 +++++++++++++++++++-------------- 4 files changed, 45 insertions(+), 28 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 584fc49c..c08b1de1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -287,7 +287,7 @@ dependencies = [ [[package]] name = "libwayshot" -version = "0.3.1-dev" +version = "0.3.2-dev" dependencies = [ "image", "memmap2", @@ -752,7 +752,7 @@ dependencies = [ [[package]] name = "wayshot" -version = "1.3.2-dev" +version = "0.3.2-dev" dependencies = [ "clap", "dialoguer", diff --git a/Cargo.toml b/Cargo.toml index 039fe088..2da0853e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,17 @@ [workspace] resolver = "2" -members = [ - "wayshot", - "libwayshot", -] +members = ["wayshot", "libwayshot"] + +[workspace.package] +authors = ["Shinyzenith "] +homepage = "https://waycrate.github.io" +description = "Screenshot crate for wlroots based compositors implementing the zwlr_screencopy_v1 protocol." +keywords = ["screenshot", "wayland", "wlroots", "wayshot"] +license = "BSD-2-Clause" +repository = "https://git.sr.ht/~shinyzenith/wayshot" +version = "0.3.2-dev" +edition = "2021" + +[workspace.dependencies] +libwayshot = { version = "0.3.2-dev", path = "./libwayshot" } +tracing = "0.1.37" diff --git a/libwayshot/Cargo.toml b/libwayshot/Cargo.toml index b2d587fe..b5188fc0 100644 --- a/libwayshot/Cargo.toml +++ b/libwayshot/Cargo.toml @@ -1,19 +1,20 @@ [package] -authors = ["Shinyzenith "] -description = "Screenshot crate for wlroots based compositors implementing the zwlr_screencopy_v1 protocol." -keywords = ["screenshot", "wayland", "wlroots", "wayshot"] -license = "BSD-2-Clause" -repository = "https://git.sr.ht/~shinyzenith/wayshot" name = "libwayshot" -version = "0.3.1-dev" -edition = "2021" +authors.workspace = true +description.workspace = true +keywords.workspace = true +license.workspace = true +repository.workspace = true +version.workspace = true +edition.workspace = true [dependencies] +tracing.workspace = true image = { version = "0.24", default-features = false } memmap2 = "0.9.0" nix = { version = "0.27.1", features = ["fs", "mman"] } thiserror = "1" -tracing = "0.1.37" + wayland-client = "0.31.1" wayland-protocols = { version = "0.31.0", features = ["client", "unstable"] } wayland-protocols-wlr = { version = "0.2.0", features = ["client"] } diff --git a/wayshot/Cargo.toml b/wayshot/Cargo.toml index 212e99f1..8d4aa528 100644 --- a/wayshot/Cargo.toml +++ b/wayshot/Cargo.toml @@ -1,27 +1,32 @@ [package] -authors = ["Shinyzenith "] -description = "Screenshot tool for wlroots based compositors implementing the zwlr_screencopy_v1 protocol." -documentation = "https://docs.rs/crate/wayshot/latest" -edition = "2021" -homepage = "https://waycrate.github.io" -keywords = ["screenshot", "wayland", "wlroots"] -license = "BSD-2-Clause" name = "wayshot" -repository = "https://git.sr.ht/~shinyzenith/wayshot" -version = "1.3.2-dev" +version.workspace = true +authors.workspace = true +description.workspace = true +documentation = "https://docs.rs/crate/wayshot/latest" +edition.workspace = true +homepage.workspace = true +keywords.workspace = true +license.workspace = true +repository.workspace = true [build-dependencies] flate2 = "1.0.27" [dependencies] -clap = "4.4.6" +tracing.workspace = true -tracing = "0.1.37" -tracing-subscriber = "0.3.17" +libwayshot.workspace = true -libwayshot = { version="0.3.1-dev", path = "../libwayshot" } +clap = "4.4.6" +tracing-subscriber = "0.3.17" -image = { version = "0.24", default-features = false, features = ["jpeg", "png", "pnm", "qoi"] } +image = { version = "0.24", default-features = false, features = [ + "jpeg", + "png", + "pnm", + "qoi", +] } dialoguer = { version = "0.11.0", features = ["fuzzy-select"] }