Skip to main content

Crate dbus_router

Crate dbus_router 

Source
Expand description

D-Bus Router Library

A dual-upstream D-Bus router that can route messages to different buses based on destination matching rules.

§Example

use dbus_router::{Config, Router};
use std::path::PathBuf;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let config = Config::default();
    let router = Router::new(
        PathBuf::from("/tmp/proxy.sock"),
        "unix:path=/run/user/1000/bus".to_string(),
        "unix:path=/tmp/sandbox.sock".to_string(),
        config,
    );
    router.run().await
}

Re-exports§

pub use config::Config;
pub use config::RouteRule;
pub use router::Router;

Modules§

config
Configuration file parsing for routing rules
router
Router core: listen for connections and spawn sessions