#dbus #async


Asynchronous DBus library

4 stable releases

2.1.0 Jan 31, 2021
2.0.0 Dec 4, 2020
1.1.0 Jun 30, 2020
1.0.0 Jun 14, 2020

#265 in Asynchronous

46 downloads per month
Used in 2 crates

BSD-3-Clause and LGPL-3.0

1.5K SLoC


A pure Rust written asynchronous DBus library. Latest version License Dependency status


Add this to your Cargo.toml:

dbus-async = "~2.1.0"

You have to specify, which Tokio Runtime should be used.

  • For multi-threaded add this to your Cargo.toml:
    version = " ~1.1.1"
    features = ["rt-multi-thread"] 
  • For single-threaded add this to your Cargo.toml:
    version = "~1.1.1"
    features = ["rt"] 


use dbus_async::DBus;
use dbus_message_parser::Message;
use std::convert::TryInto;

async fn main() {
    let (dbus, _server_handle) = DBus::session(true)
        .expect("failed to get the DBus object");

    // Create a MethodCall.
    let msg = Message::method_call(

    // Send the message and get the return message.
    let return_msg = dbus.call(msg).await;

    // Print the return message.
    println!("{:?}", return_msg);

If you want to implement a DBus service and do not implement the dbus_async::Handler trait manually then use dbus-async-derive crate.



~92K SLoC