🔖 zvariant 5.0.0
github-actions
released this
17 Oct 20:28
·
269 commits
to main
since this release
- ⚡️
Signature
now an enum representing the D-Bus signature in a parsed form. - ⚡️ Replace
Type::signature
method with a const namedSIGNATURE
. This greatly improves the
(de)serialization performance, in some cases even up by 94%. - ✨ Implement
Type
for:- cells.
- remaining std collections.
- usize and isize.
- socket addresses.
- weak pointers.
- ranges.
- atomics.
- wrapper types.
chrono::{Month, NaiveTime, Weekday}
.camino
utf-8 path types.
- 🚸 Allow
zbus
attribute in macros. - ✨
Type
derive macro now validates user provided signature string at compile-time. - 🚚 Rename DynamicType::dynamic_signature to signature.
- ⬆️ Bump MSRV to 1.81.
- 🔥 Drop API deprecated in 4.0.
- 💥 Drop now unneeded
CompleteType
type. - 🥅 Error out on attempt to create an empty structure.
- 🔥 Drop
Default
impl forStructure
. An empty structure is against the specification and we
shouldn't allow it to be created, let alone be a default value. Users should use StructureBuilder
to create a structure. - 🏷️ Add
Error::EmptyStructure
. - 🙈 Hide
gvariant::Deserializer
from public API. - 🔥 Drop unnecessary checks for
option-as-array
feature. - ⚡️ Don't check strings for embedded null bytes. In most cases (I'd say at least 99.9% of
them), this is needless. They've a non-zero cost, which is high enough to be noticeable in case of
a lot of strings being serialized. - 🐛 Fix deserialization of recursive variants from JSON. JSON will decode a variant as a map and
ourValue
'sVisitor
implementation wasn't handling that. This resulted in us not being able
to decode back our own generated JSON in case of variants inside variants. #549 - 🚚 Drop weird Value type and field names when (de)serializing. This is no longer needed. While
this doesn't completely fix #176, this goes as far as we can IMO. For D-Bus we need the signature
to be able to derialize any data to a Value. - ⚡️ Micro optimization of byte arrays.
- 🔥 Basic::alignment now implemented for you.
- 🏷️ Add Error::InvalidSignature variant.
- 📝 Better document
Str
type. - ➕ New dependencies
nom
(indirectly throughzvariant_utils
).zvariant_utils
.