Releases: dbus2/zbus
Releases · dbus2/zbus
🔖 zvariant 5.5.1
A bugfix release, fixing the breakage from 5.5.0 (now yanked):
- 🚑️ Use
pub use
instead of a type alias. foras_value::{Deserialize, Serialize}
. They structs expose their main internal field and get instantiated directly in the using code and that seems to break the API compatiblity when using type aliases. - 🔥 Drop as_value::{Serialize, Deserialize} re-export. This was an accident. We don't want them on the crate-level.
🔖 zvariant 5.5.0
- 🚑️ Ensure empty array is (de)serialized the same way as unit type.
- ✨ Add as_value module. This new module provides API that can be used with
serde::{Serialize::Deserialize}
derives to (de)serialize a value as aValue
(variant type). This is espcially useful for (de)serialization of structs as a dictionary (a{sv}
). - 🗑️ Deprecate SerializeDict & DeserializeDict macro. Now that user can directly use
serde::{Serialize, Deserialize}
for dict encoding of a struct, we don't need these anymore. - 🚚 Move SerializeValue & DeserializeValue into as_value & rename. These types belong in
as_value
module and given the context, we can just name themSerialize
andDeserialize
. We still provide type aliases to not break the API. - 📝 Improve
Str
docs. - 🚑️ Correctly handle identifier de for gvariant. We basically just need to do it exactly the same way as we do for the D-Bus format.
- 🚑️ More robust deserialization of variants. Our deserializers rely on a specific behavior from the Value's Deserialize impls, and that fails when Value is being deserialized in a generic way (through deserialize_any or deserialize_ignored_any) and we end up with overflowing the stack. This happens for example when ignoring unknown fields/entries. Unfortunately, in case of GVariant we now no longer error out if a null byte is missing in a string type. You can blame Allison Lortie for removing the null-termination from a signature only when it is encoded in a variant but not otherwise. :)
- ✨ Allow structs to be serialized as dictionaries.
- ✨ zb,zn,Implement Borrow for Owned* types. Implementing
Borrow
makes things such as usingOwned*
types as keys easier, and it was more-or-less designed for this type of scenario anyway. Although it comes with some stringent requirements (i.e. traits implemented on the owned type need to have identical behavior to the borrowed type), all of these types are already rather thin wrappers to begin with. - ➖ Drop
static_assertions
dep. - 🐛 fix wrong lifetime when creating a Value from &Vec and &[]. When creating a Value from a borrowed vec or slice using Value's From implementation, the compiler would wrongfully assume, that the created value has the same lifetime, even though the input gets cloned when creating the Array struct. This commit makes the impl assign a new lifetime to the cloned value.
- ✨ Implement rename/rename_all when deriving Value/OwnedValue. Previously, setting these values would not apply to implementations of From and TryFrom when converting between a type and Value/OwnedValue. This change makes it so using rename or rename_all will apply to these traits. #320
- ✨
*Value
derive macros:- Support string encoding for enums.
- Support enum variants without explicit values.
- 🐛 Prefix a local variable w/
__
so it doesn't conflict w/ fields. ..in the struct derivingDeserializeDict
. #1252.
🔖 zbus 5.6.0
- 🚑️ Fix fdo::StatsProxy method return values. The return value of the methods were wrong so we fix it now. #1341
- 🚸 fdo::StatsProxy methods now return structs. Now that we can use serde derives directly, we can make use of the
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. - 📝 Document fdo::StatsProxy.
- ⬆️a Require zvariant 5.5 and make use of its new API.
- ✨ Make OwnerChangedStream ordered. NameOwnerChangedStream is already ordered, so switching out the .map implementation and implementing OrderedStream is all that's needed.
- ✨ Expose low-level serial fields in builder.
- 🛂 Add support for ProcessFD/pid_fd credentials.
- ⚡️ Don't clone signature when creating body.
- ✅ Add body & signature getter to msg de benchmarks. This temporarily takes the benchmark go slower by 50%. This will be fixed in the next commit.
- ➖ Drop uneeded deps xdg-home & async-fs.
- ➖ Drop
static_assertions
dep. - ✏️ Fix a typo in README.
🔖 zvariant 5.4.0
- ✨
*Value
derive macros now support optional fields in dict structs. #311
🔖 zbus 5.5.0
- ➖ Replace
futures-util
dependency withfutures-lite
. With the (default)async-io
feature,
futures-lite
was already an indirect dependency whilefutures-util
was not.
🔖 zvariant_utils 3.2.0
- ⬆️ Update winnow to 0.7.
🔖 zvariant 5.3.0
- ✨ Implement
From<Arc<str>>
&From<Cow<str>>
forValue
. - 🐛 Don't assume enum discriminant to be always a literal in
Value
macros. - ⬆️ Update
winnow
to 0.7. - ⬆️ Update
rand
to 0.9.0.
🔖 zbus_xmlgen Release 5.1.0
- ⬆️ Update clap to v4.5.27.
🔖 zbus_names 4.2.0
- ⬆️ Update winnow to 0.7.
🔖 zbus 5.4.0
- 🐛 Correctly format list of accepted auth mechanisms in error string. #1216
- 🩹 Do not reply if no-reply-expected flag is set.
- ⬆️ Update
winnow
to 0.7. - ⬆️ Update
rand
to 0.9.0.