Skip to content

Releases: dbus2/zbus

πŸ”– zbus_names 4.1.0

02 Nov 22:40
74b880f
Compare
Choose a tag to compare
  • ⚑️ Use winnow for validation of all names. This greatly simplifies the code and in most
    cases, also much faster. #1070.
  • πŸ₯… More appropriate error on bus name parsing failure.
  • 🚸 More specific error on invalid name conversion.
  • 🏷️ Add Error::InvalidNameConversion.
  • πŸ—‘οΈ Deprecate specific invalid name variants of Error.
  • 🚸 Use Error::InvalidName variant for invalid name everywhere.
  • 🏷️ Add Error::InvalidName variant and all name parsing failures now return this variant.
  • ⬇️ Reduce rust-version to 1.80. #1107
  • βž• Add direct dep on winnow.

πŸ”– zbus 5.1.0

02 Nov 23:10
74b880f
Compare
Choose a tag to compare
  • ⬇️ Reduce rust-version to 1.80. #1107
  • 🦺 Verify validity of names and object paths pased to macros at compile time.
  • πŸ› Generate interface properties signal methods only when needed.
  • ♻️ Use winnow for parsing GUID and D-Bus address strings. #1070
  • ✨ Add support for unixexec transport.
  • πŸ”Œ Add Command stdio socket type. This socket communicates with a spawned child process via
    its standard input and output streams.
  • βž• Add direct dep on winnow.

πŸ”– zvariant_utils 3.0.1

21 Oct 00:38
1850dac
Compare
Choose a tag to compare
  • ⚑️ Switch from nom to winnow for signature parsing. This brings in 2 benefits:
    • The signature parsing code is now up to 30% faster. This directly translates to
      encoding/decoding speed of variants (used extensively in the D-Bus/gvariant world). This is the
      path that saw the least optimization in 5.0.0.
    • We'll now be able to remove nom and minimal-lexical deps (recently introduced in 5.0.0).
      Apparently winnow was already our indirect dependency so no new deps needed.
  • βž• Add a direct dep on winnow.
  • βž– Drop now unneeded nom dependency.

πŸ”– zvariant 5.0.1

21 Oct 00:41
405a432
Compare
Choose a tag to compare
  • πŸ“Œ 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 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.

πŸ”– zbus 5.0.1

21 Oct 00:43
6201c05
Compare
Choose a tag to compare
  • πŸ“Œ 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 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.

πŸ”– zbus_xmlgen 5.0.0

18 Oct 11:17
88e5e53
Compare
Choose a tag to compare
  • ⬆️ Upgrade dependencies:
    • zbus 5.0.0
    • zbus_xml 5.0.0
    • clap 4.5.4.
  • ⬆️ Bump MSRV to 1.81.
  • βž– Remove direct dep on zvariant.
  • 🩹 Set visibility of generated proxy to pub. This was the default visibility until proxy
    macro started to respect the visibility of the input trait. Let's set it to pub by default as
    that's what most folks will likely want. If not, they can easily modify it.

πŸ”– zbus 5.0.0

18 Oct 11:05
d641460
Compare
Choose a tag to compare
  • πŸ‘½οΈ 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 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.
    • 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 use ANONYMOUS.
    • πŸ›‚ 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 the SignalEmitter 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.
    • 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 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.
    • Move AuthMechanism from crate root to conn. We leave the AuthMechanism in the root as
      deprecated.
  • πŸš‘οΈ 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
    the Proxy 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.
  • 🚩 Add serde_bytes Cargo feature. This is just a proxy feature for zvariant's serde_bytes
    feature. #1052
  • 🚩 Feature-gate blocking API. Add a cargo feature called blocking-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.
  • βž• 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 if p2p feature is enabled. This means
      that rand dependency is dropped for typical users.
  • ⬆️ 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.

πŸ”– zvariant_utils 3.0.0

17 Oct 02:20
e2210d7
Compare
Choose a tag to compare
  • πŸ§‘β€πŸ’» Add support for multiple lists to def_attrs! macro.
  • ✨ Add Signature type that represents a D-Bus type signature in parsed form.
  • 🚚 Move serialized::Format from zvariant to zvariant_utils.
  • πŸ”₯ Drop old_new macro. Also the related AttrParse trait. We only needed it to support the
    old dbus_proxy and dbus_interface attributes in zbus macros but we just dropped them.
  • 🚩 Add gvariant cargo feature. This is the same feature flag we've in other crates.
  • βž• New deps:
    • serde
    • nom
    • static_assertions
  • ⬆️ Bump MSRV to 1.81.

πŸ”– zvariant 5.0.0

17 Oct 20:28
3ae1919
Compare
Choose a tag to compare
  • ⚑️ Signature now an enum representing the D-Bus signature in a parsed form.
  • ⚑️ Replace Type::signature method with a const named SIGNATURE. 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 for Structure. 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
    our Value's Visitor 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 through zvariant_utils).
    • zvariant_utils.

πŸ”– zbus_xml 5.0.0

17 Oct 22:54
1bfbbab
Compare
Choose a tag to compare
  • πŸ‘½οΈ Require and adapt to zvariant 5.0.
  • ⬆️ Bump MSRV to 1.81.
  • ⬆️ Update quick-xml to 0.36.
  • ⬆️ Update serde to 1.0.200.
  • πŸ“ Correct logo URL in docs.
  • πŸ’„ Use the new logo in docs.
  • πŸ“„ Add LICENSE file to the subcrate. #694