NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io
crates.io, #898 most downloaded on crates.io
API for D-Bus communication and its wire format
Latest stable
6.2.1
Last release 21 days ago
01 Nov 2026
Ships fairly regularly
a new release about every 5 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
6 years old
96 releases · first in 2020
Drag across the ruler to compare, or tap a release to open it.
Check message bodies without an if let guard.
if let guard.Add Connection::send_all. #2078
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Support the eavesdrop key of match rules.
The book's Upgrading to zbus 6.0 chapter is the complete list of this release's breaking changes; the Breaking group below holds only some of them.
The book's Upgrading to zbus 6.0 chapter is the complete list of this release's breaking changes; the Breaking group below holds only some of them.
async-io feature and crates with default-rt: zruntime's runtime, one per
thread that calls block_on and driven by that thread.abstractions module to runtime.tracing an optional feature. #331service feature. #1135proxy feature.async-fs cargo feature. #1287Error::Connection.proxy and service features.PropertyStream yield changes if service starts later.Message to Error::FDO for matching method errors.zbus::Error.DBusError. #313ObjectServer::at hand back the interface on conflict. #235Builder::user_id names on WASI.Error::Connection message.ifs into let chains.MAX rather than the deprecated max_value() in examples.PropertyStream of a service that starts later.🗑️ Deprecate unix_stream/tcp_stream when tokio is disabled.
✨ Add Connection::closed() and is_closed() API.
♻️ Move pending method call to separate module.
🔧 Restrict vsock features to Linux targets.
🗑️ Deprecate DispatchResult in favour of DispatchResult2.
✨ Add helper for IBus connection creation. #964
🐛 fix regression on windows build. #1686
🐛 Implement get_machine_id() for *BSD platforms.
get_machine_id() for *BSD platforms.✨ Add crate attribute for custom crate paths.
MSG_NOSIGNAL flag enabled. #1657get_machine_id for macOS.🚚 Update name of Github space from dbus2 to z-galaxy.
dbus2 to z-galaxy.Error::description method. This gives a simple description about the error.rand and replace with uuid. This makes uuid mandatory for zbus, and changes the p2p feature to enable v4 of uuid.✨ API to specify timeouts for method calls. Add a way to specify an timeout for method calls. If set, the method calls will timeout after the specifie
connection::socket::Split::new method, allowing Socket trait impls outside zbus.proxy docs.✨ Property stream will now first yield the current value.
Proxy methods.🧵 Remove deadlocks in Connection name request tasks, resulting in leaks under certain circumstances.
connection::Builder.RequestNameFlags. This change is theoretically an API break for
users who assumed the default value to be empty.fdo::StartServiceReply type. In 6.0 this will be the return type of
fdo::DBusProxy::start_service_by_name. For now, just provide a TryFrom<u32>.✨ interface macro now supports write-only properties.
interface macro now supports write-only properties.receive_*_changed and cached_* methods in proxy.✏️ Trivial typo fix in error message.
✨ Add ProcessFD/pidfd to peer ConnectionCredentials.
🚑️ Fix fdo::StatsProxy method return values. The return value of the methods were wrong so we fix it now. #1341
flatten attribute and have a very strongly-typed API for the statistics standardized by the D-Bus specification while still parsing and returning any bus broker specific statistics returned by these calls.static_assertions dep.➖ Replace futures-util dependency with futures-lite. With the (default) async-io feature, futures-lite was already an indirect dependency while future
futures-util dependency with futures-lite. With the (default) async-io feature,
futures-lite was already an indirect dependency while futures-util was not.🐛 Correctly format list of accepted auth mechanisms in error string. #1216
winnow to 0.7.rand to 0.9.0.🐛 Drop unnecessary 'static lifetime requirements in proxy. The passed strings just need to satisfy the inner lifetime of the proxy.
⚡️ Make header cloning cheaper.
header & signal_emitter parameters in interface property getters.Don't use proxies in connection code. This allows LTO to remove the proxy-side code from the binary if the users isn't directly using proxy APIs. On b
interface now allows disabling docs in introspection. Introspection strings are part of the
binary and can have an impact on the binary size. This change allows to disable the addition of
docs in the introspection for cases where there interface is well-known/well-documented. For
example, combined with the following change of using this in the zbus::fdo interfaces, this
will allow busd binary to shed 26 KB.interface macro. Add values already known to the
introspection XML at compile time. This also removes about 500 bytes from busd binary size.gvariant feature flag to zbus_macros. It's just a proxy feature for zvariant and
only needed to fix the build in the root workspace when building with --features gvariant.
#1125.self in an instrumented method.sink feature of futures-util.➖ Tie async-process dependency to async-io feature, instead of the target OS. This fixes tokio users (a big majority of our users) needlessly dependin
async-process dependency to async-io feature, instead of the target OS. This fixes
tokio users (a big majority of our users) needlessly depending on it along with a bunch of its
dependencies.⬇️ Reduce rust-version to 1.80. #1107
rust-version to 1.80. #1107unixexec transport.Command stdio socket type. This socket communicates with a spawned child process via
its standard input and output streams.winnow.📌 Don't pin zvariant_utils dep. We don't always release zvariant_utils together with other crates, so unlike the macros crates, the versions don't nee
zvariant_utils dep. We don't always release zvariant_utils together with other
crates, so unlike the macros crates, the versions don't need to be tied together. This will also
allow us to bring zvariant_utils improvements to users without having to release all dependent
packages as well.Rename SignalContext to SignalEmitter. Since now this emits signals, this is a more appropriate name. We keep a deprecated SignalContext type alias as…
proxy macro respects visibility. This includes all types generated by proxy. Unfortunately
this means that the existing code will have to set the visiblity explicitly to pub if they
were relying on the generated proxy to be public.DBUS_COOKIE_SHA1 auth mechanism. #727
sha1 crate as a dependency, which can be problematic for some users. #543EXTERNAL is not an option, you might as well just use ANONYMOUS.fdo API.interface now generates a trait, <InterfaceType>Signals, that provides the same signal
methods as user specifies but w/o the SignalEmitter argument (#871). The macro also generates
2 implementations of this trait for:
SignalContext::emit. Add a new method to SignalContext that allows emitting a signal for
a given interface and singal name.SignalContext to SignalEmitter. Since now this emits signals, this is a more
appropriate name. We keep a deprecated SignalContext type alias as well as the
signal_context attribute of interface for not completely breaking the existing code.AuthMechanism in the root as
deprecated.Proxy API.p2p feature is enabled.serde_bytes Cargo feature. This is just a proxy feature for zvariant's serde_bytes
feature. #1052blocking-api to zbus &
zbus_macros. When enabled, the zbus::blocking module is available. When disabled, proxy
macro ignores the value of gen_blocking attribute and doesn't generate blocking proxy. This
feature is enabled by default.camino feature as proxy for zvariant feature of the same name.sha1 crate.futures-sink.rand now an optional dependency. It is only enabled if p2p feature is enabled. This means
that rand dependency is dropped for typical users.blocking module docs.🚑️ Fix regression of not replying to inexistent methods. #905.
heapless feature, which is just a proxy to zvariant feature of the same name.💩 Workaround for xdg-dbus-proxy's monotonic serial requirement. While [the underlying issue in xdg-dbus-proxy][1] has already been fixed, it will take
mdbook-toc from @badboy.✨ interface can now generate proxy for you. #236
interface can now generate proxy for you. #236object_server::ResponseDispatchNotifier
serde::Deserialize for it.blocking::Connection::call_method docs.🚑️ zm: Fix a regression introduced by in 4.2.0, resulting in tasks not being spawned for methods by default. #799
Don't invalidate all properties on change. This fixes a regression in c1aa5c72, where we started to invalidate properties in every PropertyChanged sig
PropertyChanged signal. This is wrong anyway but it
also meant zbus interfaces breaking against gio. #765assert! instead of debug_assert!. debug_assert! is removed in release builds, along
with any values computed inside it. This meant that since the use of debug_assert! in
commit 7fc3ab7b8f69e21822a0d569222baba4b72de13f, the fdo interfaces weren't getting added for
nodes for release profile. Let's use assert! instead. #764NEGOTIATE_UNIX_FD command's response before sending out
BEGIN command and Hello method call message.🗑️ Deprecate connection::Builder::auth_mechansims. In favor of auth_mechansim. This is in preparation for #731, when we will remove this method entire…
dbus_interface now provides a spawn
attribute to control whether the method call handling is spawned as a task or not.connection::Builder::authenticated_socket to create a
connection for in-process communication. #591.Hello method call to the
bus. This reduces unnecessary round-trips & hence latencies. #493auth_mechansim. This is in
preparation for #731, when we will remove this method entirely.windows-gdbus feature and associated hacks.
Turns out that the reference D-Bus implementation supports autolaunch fine and we don't need
special support for gdbus binary. Hopefully, in the near future, busd will also support it. #687Interface being unstable API. Also recommend what people should do when
dbus_interface isn't enough.CANCEL command
during a handshake, the server must move on to the next handshake method available (if any).To go with zbus_macros 4.1.2. Other changes:
To go with zbus_macros 4.1.2. Other changes:
The actual change is in zbus_macros 4.1.1.
The actual change is in zbus_macros 4.1.1.
🚑️ zb: Fix a deprecation re-export.
🏷️ Implement ProxyDefault for blocking::Proxy that was missed in 4.0.0.
ProxyDefault for blocking::Proxy that was missed in 4.0.0.A new API-breaking release that brings in a huge amount of changes. Most using code should still compile (with deprecation warnings) and work without…
A new API-breaking release that brings in a huge amount of changes. Most using code should still compile (with deprecation warnings) and work without changes. Hightlights:
xml
and quick-xml feature flags are removed as a result. #413.&zvariant::serialized::Data.send method instead.&Guid now, instead of a string.Guid now has a lifetime parameter, and
OwnedGuid is a new type that's a wrapper around Guid<'static>. Internally, Guid is now a
wrapper around zvariant::Str and is now a very similar type to other zvariant::Str wrapper
types.address::Transport. Address` is
no longer an enum but a struct with hidden fields. #476.Address instance.unix:tmpdir and unix:dir transports.for<'d> zvariant::DynamicDeserialize<'d> on the result type of a call is sufficient to
deserialize; use this bound instead of the stricter DeserializeOwned + zvariant::Type.p2p feature. Given that typical users do not need this API, we don't enable it by default.bus-impl cargo feature. API that is only needed by bus implementations now gated behind this non-default cargo feature. #480.
the peer-to-peer and bus implementation API respectively.async-recursion for targets other than MacOS and Windows.blocking::ObjectServer. Not exactly a smart pointer. Also other blocking wrappers don't do that. #475.Connection managing the serial numbers.option-as-array feature. This is a mainly a zvariant proxy/forwarding feature.Option<T> has zvariant::Type
implemented but D-Bus encoding doesn't support that and people get runtime errors instead.To go with zbus_macros 3.15.2. Other changes:
To go with zbus_macros 3.15.2. Other changes:
🚨 Impl Display instead of ToString for MatchRule.
🐛 Add missing nix feature. 🏷️ Add ResponseDispatchNotifier type. A wrapper interface method response type that notifies the caller of the response bei
🐛 Add missing nix feature.
🏷️ Add ResponseDispatchNotifier type. A wrapper interface method response type that notifies the
caller of the response being sent off.
🚸 Specify service and object path for Monitoring & Debug.Stats proxies. These defaults to be
based on the interface name otherwise and that's not the expected bhaviour.
✏️ Fix a typo in docs.
Brown paperbag release to fix a typo in the README/crate docs.
Brown paperbag release to fix a typo in the README/crate docs.
New clippy warns about this. 🩹 fdo::DBus::get_id returns Guid instead of raw String. Theoretically, this is a breaking change, but this is also a fix…
✨ Add arg0ns to match rule. arg0namespace has an overly restrictive type (InterfaceName), which
disallows valid values (e.g. those containing '-' or single-element names such as 'org'). Further
more, a MatchRule with arg0namespace previously would not match a message whose arg0 is not a
valid InterfaceName (even if it is a valid BusName). Fixes #382.
✨ Derive Debug for MatchRuleBuilder.
✨ Implement Clone for MessageBuilder.
✨ Add a from_bytes constructor for Message. Closes #326
✨ Allow unicast signals through the dbus_interface. Fixes #374.
✨ Provide various string conversions from Guid.
✨ impl From<String> for Guid.
✨ Implement Type, Serialize & Deserialize for Guid. So that this can be returned from
dbus_interface and dbus_proxy methods.
✨ Owned getters for ConnectionCredentials fields. For non-Copy fields (i-e those requiring
allocation).
✨ impl From<MessageHeader> for MessageBuilder.
✨ Add MessageStream::{max_queued,set_max_queued}. Add getter and setter for message queue
capacity. #350.
🚑️ Fix how MatchRule handles arg0namespace. arg0.starts_with(arg0namespace) is not enough. For
example, namespace 'o' should not match 'org.foo'.
🚑️ Drop signature & fds from fields. when converting a MessageHeader into a MessageBuilder
since these fields are dependent on the body and that's specified later.
🚑️ Handle 0 bytes received from socket. Seems the assumption that we can't ever get 0 bytes is
wrong.
🐛 Don't choke on empty match rule arg values.
🩹 zb: Drop unneeded use of all in cfg attributes. New clippy warns about this.
🩹 fdo::DBus::get_id returns Guid instead of raw String. Theoretically, this is a breaking
change, but this is also a fix since the method should have been returning the more specific
type. To make things easier for users, we provide a more conversions from Guid to String and
&str.
🩹 Manual impl for Deserialize for Guid. So we can verify it's a valid UUID string.
⚡️ Box a large future. Fixes new clippy warning about large futures. Fixes #330.
⬆️ Bump our MSRV. More and more dependencies are requiring Rust 1.64.0, so let's bump our MSRV to match.
⬆️ Require zbus_names 2.6.0.
⬆️ Require zvariant 3.15.0.
⬆️ Update enumflags2.
📝 Fix link to DBusError derive.
📝 Warn about example code requiring a session bus in README/crate docs. Fixes #389.
📝 Update forgotten links to old book location.
📝 Clarify MatchRule::arg0namespace docs.
📝 Fix link to DBusError derive.
📝 Add IBus example for ConnectionBuilder::address. Fixes #361.
🗑️ Deprecate MatchRule(Builder)::arg0namespace in favour of arg0ns.
🧪 Test empty args in match rules. Turns out we can't parse match rules with empty argument values.
➕ Add optional dep on blocking. If async-io is enbled, we now depend on blocking. This just
turns it into a direct dependency.
🎨 Code comments should also adhere to 100 character limit.
🎨 Minor formatting change.
Don't use empty struct for body to start at 8-byte boundary.
Deprecate Connection::peer_sid in favor of Connection::peer_credentials.
Connection::peer_credentials method. Instead of adding multiple individual methods for each
credential type, let's add a single method that returns all peer credentials.ConnectionCredentials struct. This will mainly be useful for bus
implementations to be able to create this struct for themselves (e.g on a
DBus.GetConnectionCredentials D-Bus call for the bus itself).async-process on MacOS target.process feature of tokio crate.Connection::peer_sid in favor of Connection::peer_credentials.fdo::ConnectionCredentials fields. If we ever need to add more fields to the struct,
we can't do it without breaking the API. So let's deprecate the fields and have everyone use the
new getters instead.cfg for Windows.ObjectServer should dispatch calls without destination since p2p connections typically don't have destinations.
ObjectServer should dispatch calls without destination since p2p connections typically don't have destinations.nix that we use.ConnectionBuilder as must_use. Instead of every builder method of it individually.xdg-home.lazy_static.dirs dep.nix dep for non-unix (i-e Windows).Fix server example in the docs and README.
Fix server example in the docs and README.
ConnectionBuilder::build shouldn't assume executor ticking. This fixes a deadlock when internal executor is disabled and interface is added to the bui
Error:MissingParameter variant.Clone for InterfaceRef.SignalStream::name getter.SignalStream's inner lifetime need to be tied to that of proxy's inner lifetime, not the proxy
itself. In case of macros, we can declare it as '`static'.io feature of futures-util if async-io is enabled.async-fs.nix to 0.26.Avoid missing property changes during property stream setup.
ordere_stream::OrderedStream implementations.Fix deadlock in properties caching on invalidation against multithreaded tokio runtime.
PropertiesChanged signal after
Proxy::receive_property_changed returns.Connection when ObjectServer is used.Add AsyncDrop trait. Until there is an [upstream Rust support for async dropping][async_drop] we will need this for explicit drop of async resources.
AsyncDrop trait. Until there is an upstream Rust support for async dropping we will need this for explicit drop of async resources.AsyncDrop for MessageStream, SignalStream, & macro-generated signal streams. This will allow users to immediately deregister the associated match rules (if any).EXTERNAL auth in server handshake.self in handshake traces. Otherwise it creates a lot of noise.Hello method call from the client if the client is too fast for the server.ToString implementation of MatchRule to include arg0namespace.Introduce Error::InputOutput(Arc<..>) and deprecated Error::Io in favour of it.
Clone for Error and fdo::Error.MatchRule::matches to check if a MatchRule matches a Message.{MessageStream, blocking::MessageIterator}::for_match_rule to create a stream that only
yields messages that match a MatchRule. This allows for efficient filtering of messages and
avoids unnecessary task wakeups. {SignalStream, blocking::SignalIterator}, ObjectServer and
method calls make use of this API internally.Error::InputOutput(Arc<..>) and deprecated Error::Io in favour of it.Error::Failure variant.ConnectionBuilder::unique_name. This is meant for bus implementations to allow them to set
a unique_name before all other initialisations happen. For one, this would allow ObjectServer
to be able to filter messages to the bus itself.From<&MessageStream> for Connection.async-channel dependency.quick-xml 0.27.1.zvariant 2.10.zbus_names 2.5.async-io 1.12.0.async-executor 1.5.0.async-broadcast 0.5.0.ordered-stream 0.1.3.Drop unused generic from blocking::Proxy::call_with_flags.
Drop unused generic from blocking::Proxy::call_with_flags.
Add an alternative XML parsing API based on quick-xml, which is enabled through a new quick-xml cargo feature. This is because serde-xml-rs is unmaint
Add an alternative XML parsing API based on quick-xml, which is enabled through a new quick-xml
cargo feature. This is because serde-xml-rs is unmaintained,. serde-xml-based xml API will
eventually be dropped in favour of this.
Including new API in a micro release cause this was intended to be part of 3.6.0. So it's sort of a fix.
Add Add Connection::request_name_with_flags.
Proxy::call_with_flags.Add Connection::request_name_with_flags.Proxy::receive_signal_with_args, which is the same as Proxy::receive_signal but allows one to setup server-side filtering based on argument matches, thus allowing you to avoid unnecessary D-Bus traffic flowing to your connection.MatchRuleBuilder::{add_arg, add_arg_path} the same and adding new methods for adding args at a specific index.tracing feature of tokio.tokio_unstable cargo flag will need to be specified though but we leave that to the users.OwnerChangedStream. Make use of ability to set a filter on args in
match rules to only be notified of changes to name we're actually interested in.chrono feature, which is a proxy feature to enable chrono feature+dep in zvariant.…but make use of the new MatchRule type. We also deprecate the {add_match,remove_match} to discourage use of these less type-safe versions.
Hash for MessageType so it can be used as a key in hashmaps.fdo::DBusProxy::{add_match_rule,remove_match_rule}, that are
{add_match,remove_match} replacements that make the same
underlying D-Bus calls but make use of the new MatchRule type. We also
deprecate the {add_match,remove_match} to discourage use of these less
type-safe versions.ProxyBuilder::uncached_properties sets given list Instead of
appending. The usecase is for users to set it only once.ObjectServer should handle methods destined to unknown names if no
names are registered. We were only doing this for p2p case but we should
do this for bus case well. Otherwise it breaks things for folks who were
using fdo::DBusProxy::request_name along with ObjectServer for any
reason.API additions and changes mainly catered for bus implementation on top of zbus:
ObjectServer to only serve methods destined to its connection.One column per quarter.