dbus-launch

Crates.iodbus-launch
lib.rsdbus-launch
version0.2.0
sourcesrc
created_at2020-08-30 12:31:00.921237
updated_at2020-08-30 12:31:00.921237
descriptionA D-Bus daemon launcher
homepage
repositoryhttps://github.com/tmiasko/dbus-launch-rs
max_upload_size
id282670
size37,757
Tomasz Miąsko (tmiasko)

documentation

README

dbus-daemon-rs

A tool for starting an new isolated instance of a dbus-daemon or a dbus-broker, with option to configure and start services using D-Bus activation.

Examples

Launching a dbus-daemon process

// Start the dbus-daemon.
let daemon = dbus_launch::Launcher::daemon()
    .launch()
    .expect("failed to launch dbus-daemon");

// Use dbus-daemon by connecting to `daemon.address()` ...

// Stop the dbus-daemon process by dropping it.
drop(daemon);

Starting custom services using D-Bus activation

use std::path::Path;

let daemon = dbus_launch::Launcher::daemon()
    .service("com.example.Test", Path::new("/usr/lib/test-service"))
    .launch()
    .expect("failed to launch dbus-daemon");

// Use com.example.Test service by connecting to `daemon.address()` ...

License

Licensed under MIT License.

Commit count: 2

cargo fmt