From 41077950477b709b201a7fd6c8c90e82db5974cf Mon Sep 17 00:00:00 2001 From: Maximiliano Sandoval Date: Sat, 13 Jul 2024 16:23:43 +0200 Subject: [PATCH] cargo: Use workspaces --- Cargo.toml | 34 +++++++++++++++++++++++++--------- aperture/Cargo.toml | 18 +++++++++--------- 2 files changed, 34 insertions(+), 18 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 4240f641..884a6c81 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,26 @@ +[workspace] +members = [ "aperture" ] + +[workspace.package] +edition = "2021" +rust-version = "1.76" +license = "GPL-3.0-or-later" +authors = ["The GNOME Project"] + +[workspace.dependencies] +log = "0.4" +once_cell = "1.19" +futures-channel = "0.3.30" +gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_20"], version = "0.23", branch = "main" } +gtk = { package = "gtk4", git = "https://github.com/gtk-rs/gtk4-rs", features = ["gnome_45"], version = "0.9", branch = "master" } + [package] name = "snapshot" version = "46.0.0" -authors = ["Maximiliano Sandoval "] -edition = "2021" -license = "GPL-3.0-or-later" -rust-version = "1.76" +authors.workspace = true +edition.workspace = true +license.workspace = true +rust-version.workspace = true # This is manually enabled by meson [features] @@ -20,9 +36,9 @@ ashpd = { version = "0.9", features = ["gtk4", "tracing"], optional = true, git futures-channel = "0.3.26" gettext-rs = { version = "0.7", features = ["gettext-system"] } glycin = { git = "https://gitlab.gnome.org/sophie-h/glycin", features = ["gdk4"] } -gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_20"], version = "0.23", branch = "main" } -gtk = { package = "gtk4", git = "https://github.com/gtk-rs/gtk4-rs", features = ["gnome_45"], version = "0.9", branch = "master" } -log = "0.4" -once_cell = "1.17" +gst = { workspace = true } +gtk = { workspace = true } +log = { workspace = true } +once_cell = { workspace = true } tracing-subscriber = "0.3" -aperture = { path = "./aperture" } +aperture = { path = "aperture" } diff --git a/aperture/Cargo.toml b/aperture/Cargo.toml index a50f0912..45c63071 100644 --- a/aperture/Cargo.toml +++ b/aperture/Cargo.toml @@ -1,15 +1,15 @@ [package] -authors = ["The GNOME Project"] +authors.workspace = true categories = ["multimedia", "os::linux-apis", "gui"] description = "GTK Widget for cameras using gstreamer and pipewire" -edition = "2021" +edition.workspace = true keywords = ["camera", "gtk", "gstreamer"] -license = "GPL-3.0-or-later" +license.workspace = true name = "aperture" repository = "https://gitlab.gnome.org/GNOME/snapshot" documentation = "https://gnome.pages.gitlab.gnome.org/snapshot/doc/aperture" version = "0.6.3" -rust-version = "1.76" +rust-version.workspace = true [features] default = ["wayland", "x11egl", "x11glx"] @@ -18,11 +18,11 @@ x11egl = ["gst-plugin-gtk4/x11egl"] x11glx = ["gst-plugin-gtk4/x11glx"] [dependencies] -futures-channel = "0.3.26" -gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_20"], version = "0.23", branch = "main" } +futures-channel = { workspace = true } +gst = { workspace = true } gst-pbutils = { package = "gstreamer-pbutils", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", version = "0.23", branch = "main" } gst-video = { package = "gstreamer-video", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", version = "0.23", branch = "main"} gst-plugin-gtk4 = { git = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs", default-features = false, features = ["gtk_v4_14"], version = "0.13.0-alpha.1", branch = "main" } -gtk = { package = "gtk4", git = "https://github.com/gtk-rs/gtk4-rs", features = ["gnome_45"], version = "0.9", branch = "master" } -log = "0.4.17" -once_cell = "1.17.1" +gtk = { workspace = true } +log = { workspace = true } +once_cell = { workspace = true } -- GitLab