Skip to main content

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 message_rewrite;
28
29pub mod config;
30pub mod dbus_daemon;
31pub mod fake_name;
32pub mod router;
33pub mod session;
34
35// Re-export main types
36pub use config::{Config, RouteRule};
37pub use router::Router;