π zbus 5.0.0
github-actions
released this
18 Oct 11:05
·
153 commits
to main
since this release
- π½οΈ Adapt to zvariant 5.0 API. This brings in massive performance improvements to message
encoding and decoding. - π₯ Breakinging changes:
- Message body signature now mandatory.
proxy
macro respects visibility. This includes all types generated byproxy
. Unfortunately
this means that the existing code will have to set the visiblity explicitly topub
if they
were relying on the generated proxy to be public.- Drop support for
DBUS_COOKIE_SHA1
auth mechanism. #727- It drags the
sha1
crate as a dependency, which can be problematic for some users. #543 - It makes the handshake more complex, not allowing to pipeline all the commands.
- It's not widely used. If
EXTERNAL
is not an option, you might as well just useANONYMOUS
.
- It drags the
- π Only support one authentication method at a time. Now that we're down to only two
authentication mechanisms with one of them being no-authentication, this really makes sense
since we can just autodetect what authentication method to use for a specific socket type on a
specific platform. This also simplifies the handshake logic and will allow us to pipeline the
whole client-side handshake in the future, when we can drop the xdg-dbus-proxy workarounds. #781 - Drop unnecessary lifetimes on genarated signal streams.
- Streamline Message & message::Builder constructors. They should be named the same and take the
same type of arguments. - proxy::Defaults now has typed values.
- Rename proxy::ProxyDefault to proxy::Defaults.
- π₯ Drop API deprecated in 4.0.
- Minor changes in
fdo
API.
- β¨ New features:
interface
now generates a trait, Signals, that provides the same signal
methods as user specifies but w/o theSignalEmitter
argument (#871). The macro also generates
2 implementations of this trait for:- InterfaceRef, for emitting signals from outside the context of an interface
method. - SignalEmitter, for emitting signals from inside an interface methods.
- InterfaceRef, for emitting signals from outside the context of an interface
- Add
SignalContext::emit
. Add a new method to SignalContext that allows emitting a signal for
a given interface and singal name. - Add Connection::graceful_shutdown.
- Add conn::AuthMechanism::as_str(). This gives you a static string representation of the
mechanism. We'll use this in a following commit to avoid an allocation. - Add Socket::auth_mechanism. The socket impl will now inform us which authentication mechanism
should be used with it. The implementation can choose this based on the socket type and the
target platform. - Allow specifying visibility of interface-generated proxy. This implies that by default, it will
be private. - ObjectServer now implements Clone.
- π Renames and moves:
- Rename
SignalContext
toSignalEmitter
. Since now this emits signals, this is a more
appropriate name. We keep a deprecatedSignalContext
type alias as well as the
signal_context
attribute ofinterface
for not completely breaking the existing code. - Move AuthMechanism from crate root to conn. We leave the
AuthMechanism
in the root as
deprecated.
- Rename
- ποΈ Gracefully handle serial number wrap. When SERIAL_NUM wraps past u32::MAX back to zero,
the conversion to NonZeroU32 panics. #946 - π©Ή Fix some lifetimes in Proxy API. We were unnecessarily constraining the lifetimes in some of
theProxy
API. - β‘οΈ Optimizations
- Only enable Guid::generate() if
p2p
feature is enabled. - Use relaxed load order for serial number fetch & add.
- msg::Header no longer allocates.
- Avoid deserialization of msg::Header needlessly.
- Only enable Guid::generate() if
- π© Add
serde_bytes
Cargo feature. This is just a proxy feature forzvariant
'sserde_bytes
feature. #1052 - π© Feature-gate blocking API. Add a cargo feature called
blocking-api
tozbus
&
zbus_macros
. When enabled, thezbus::blocking
module is available. When disabled,proxy
macro ignores the value ofgen_blocking
attribute and doesn't generate blocking proxy. This
feature is enabled by default. - β Add
camino
feature as proxy for zvariant feature of the same name. - β Dependendies removed:
- Remove dependency on
sha1
crate. - Drop direct dep on
futures-sink
. rand
now an optional dependency. It is only enabled ifp2p
feature is enabled. This means
thatrand
dependency is dropped for typical users.
- Remove dependency on
- β¬οΈ Updated dependencies:
- zvariant to 5.0.
- windows-sys to 0.59.
- tokio-vsock 5. #643
- β¬οΈ Bump MSRV to 1.81.
- π Documentation
- Tidy documentation across entire crate.
- Improve
blocking
module docs. - Correct wrong documentation links.
- Remove a now incorrect warning from Message::header method.
- βοΈ Fix doc list item missing indentation.
- π¨ Drop invalid cfg from documentation example.