dbus_router/lib.rs
1//! D-Bus Router Library
2//!
3//! A dual-upstream D-Bus router that can route messages to different buses
4//! based on destination matching rules.
5//!
6//! # Example
7//!
8//! ```no_run
9//! use dbus_router::{Config, Router};
10//! use std::path::PathBuf;
11//!
12//! #[tokio::main]
13//! async fn main() -> anyhow::Result<()> {
14//! let config = Config::default();
15//! let router = Router::new(
16//! PathBuf::from("/tmp/proxy.sock"),
17//! "unix:path=/run/user/1000/bus".to_string(),
18//! "unix:path=/tmp/sandbox.sock".to_string(),
19//! config,
20//! );
21//! router.run().await
22//! }
23//! ```
24
25mod auth;
26mod message;
27mod session;
28
29pub mod config;
30pub mod router;
31
32// Re-export main types
33pub use config::{Config, RouteRule};
34pub use router::Router;