#D-Bus #DBus #IPC

dbus-crossroads

Framework for writing D-Bus method handlers

5 unstable releases

0.3.0 Oct 13, 2020
0.2.2 Aug 25, 2020
0.2.1 Jul 6, 2020
0.2.0 Jul 6, 2020
0.1.0 Jun 19, 2020

#11 in #d-bus

Download history 50/week @ 2020-07-04 16/week @ 2020-07-11 42/week @ 2020-07-18 21/week @ 2020-07-25 23/week @ 2020-08-01 37/week @ 2020-08-08 42/week @ 2020-08-15 42/week @ 2020-08-22 32/week @ 2020-08-29 65/week @ 2020-09-05 33/week @ 2020-09-12 30/week @ 2020-09-19 28/week @ 2020-09-26 37/week @ 2020-10-03 58/week @ 2020-10-10 41/week @ 2020-10-17

149 downloads per month
Used in 2 crates

Apache-2.0/MIT

505KB
9K SLoC

crates.io API documentation license

dbus-crossroads is a library that helps you implement interfaces on object paths, i e "server side" method handler code.

It is not as mature as dbus::tree yet, but the API should be fairly stable and easier to use than dbus::tree. Go ahead and use it, and report any issues you find!

To get started, you can jump into the commented examples, one for sync one for async (dbus-tokio), and one slightly more advanced, or familiarize yourself using the API reference.

Design decisions (compared to dbus::tree):

  • First class support for both sync and async methods
  • Detect method arguments automatically through generics
  • ...but less generics in structs you use, which means less cluttered API
  • The tree/crossroads instance is Send (but not Sync).
  • You can now modify the instance from within a method handler
  • It is objects (paths) that can contain custom data, and they can contain different data for different objects
  • Interface descriptions are kept in a registry, which means less reference counting

Dependencies