From 75e0e3be5dc1beb2c905e40e242cefb978a5b398 Mon Sep 17 00:00:00 2001 From: Zeeshan Ali Khan Date: Tue, 12 Nov 2024 22:41:41 +0100 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=93=8C=20Switch=20to=20git=20main=20o?= =?UTF-8?q?f=20zbus?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This will enable us to already start using the new `interface` attribute to disable docs in the introspection. --- Cargo.lock | 28 ++++++++++++---------------- Cargo.toml | 4 ++-- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 49dbf76..e51fe58 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1668,8 +1668,7 @@ dependencies = [ [[package]] name = "zbus" version = "5.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1162094dc63b1629fcc44150bcceeaa80798cd28bcbe7fa987b65a034c258608" +source = "git+https://github.com/dbus2/zbus/#ec45ef4bd43c90adfa9e20af1354b043ac81a553" dependencies = [ "async-broadcast", "async-recursion", @@ -1699,8 +1698,7 @@ dependencies = [ [[package]] name = "zbus_macros" version = "5.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cd2dcdce3e2727f7d74b7e33b5a89539b3cc31049562137faf7ae4eb86cd16d" +source = "git+https://github.com/dbus2/zbus/#ec45ef4bd43c90adfa9e20af1354b043ac81a553" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -1713,34 +1711,33 @@ dependencies = [ [[package]] name = "zbus_names" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdc27fbd3593ff015cef906527a2ec4115e2e3dbf6204a24d952ac4975c80614" +version = "4.1.0" +source = "git+https://github.com/dbus2/zbus/#ec45ef4bd43c90adfa9e20af1354b043ac81a553" dependencies = [ "serde", "static_assertions", + "winnow", "zvariant", ] [[package]] name = "zvariant" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c690a1da8858fd4377b8cc3134a753b0bea1d8ebd78ad6e5897fab821c5e184e" +version = "5.1.0" +source = "git+https://github.com/dbus2/zbus/#ec45ef4bd43c90adfa9e20af1354b043ac81a553" dependencies = [ "endi", "enumflags2", "serde", "static_assertions", + "winnow", "zvariant_derive", "zvariant_utils", ] [[package]] name = "zvariant_derive" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83b6ddc1fed08493e4f2bd9350e7d00a3383467228735f3f169a9f8820fde755" +version = "5.1.0" +source = "git+https://github.com/dbus2/zbus/#ec45ef4bd43c90adfa9e20af1354b043ac81a553" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -1751,9 +1748,8 @@ dependencies = [ [[package]] name = "zvariant_utils" -version = "3.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f8d85190ba70bc7b9540430df078bb529620b1464ed4a606010de584e27094d" +version = "3.0.2" +source = "git+https://github.com/dbus2/zbus/#ec45ef4bd43c90adfa9e20af1354b043ac81a553" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index e55c6a3..24a3ce9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,8 +21,8 @@ name = "busd" path = "src/bin/busd.rs" [dependencies] -#zbus = { git = "https://github.com/dbus2/zbus/", features = [ -zbus = { version = "5.0", features = [ +zbus = { git = "https://github.com/dbus2/zbus/", features = [ +#zbus = { version = "5.0", features = [ "tokio", "bus-impl", ], default-features = false } From 9ff643cd721b894c456d02550cebc678e47169e3 Mon Sep 17 00:00:00 2001 From: Zeeshan Ali Khan Date: Tue, 12 Nov 2024 22:43:11 +0100 Subject: [PATCH 2/2] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20Drop=20docs=20generati?= =?UTF-8?q?on=20in=20fdo=20interfaces?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These are well-known and documented (in the spec itself) and need not be documented in the introspection XML. Combined with similar changes in zbus, this reduces our release binary's size by 200KB. --- src/fdo/dbus.rs | 2 +- src/fdo/monitoring.rs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/fdo/dbus.rs b/src/fdo/dbus.rs index d652394..299f913 100644 --- a/src/fdo/dbus.rs +++ b/src/fdo/dbus.rs @@ -60,7 +60,7 @@ impl DBus { } } -#[interface(interface = "org.freedesktop.DBus")] +#[interface(interface = "org.freedesktop.DBus", introspection_docs = false)] impl DBus { /// This is already called & handled and we only need to handle it once. async fn hello( diff --git a/src/fdo/monitoring.rs b/src/fdo/monitoring.rs index 19c3d16..d33a5dc 100644 --- a/src/fdo/monitoring.rs +++ b/src/fdo/monitoring.rs @@ -28,7 +28,10 @@ impl Monitoring { } } -#[interface(interface = "org.freedesktop.DBus.Monitoring")] +#[interface( + interface = "org.freedesktop.DBus.Monitoring", + introspection_docs = false +)] impl Monitoring { async fn become_monitor( &self,