rdesktop_cef/lib.rs
1//! rdesktop-cef: Chrome/Chromium backend for cross-platform pixel-perfect rendering.
2//!
3//! This renderer controls a Chrome/Chromium instance via the Chrome DevTools Protocol (CDP).
4//! It provides identical rendering across Windows, macOS, and Linux since it uses the
5//! same Chromium engine everywhere.
6//!
7//! ## Architecture
8//!
9//! - Chrome is launched as a headless subprocess
10//! - Communication happens via CDP (WebSocket)
11//! - Pages are created and controlled via the CDP API
12//! - The IPC bridge is injected via `page.evaluate()`
13//!
14//! ## Requirements
15//!
16//! - Google Chrome, Microsoft Edge, or Chromium must be installed
17//! - The renderer auto-detects the Chrome executable on the system
18//!
19//! ## Trade-offs vs WebView
20//!
21//! | Aspect | WebView | Chrome (CDP) |
22//! |--------|---------|-------------|
23//! | Bundle size | ~5MB | ~150MB (Chrome required) |
24//! | Rendering | Platform-specific | Identical everywhere |
25//! | Native window | Yes (tao) | Headless (screenshot-based) |
26//! | Performance | Native | Slight overhead (CDP + screenshot) |
27
28pub mod renderer;
29
30pub use renderer::CefRenderer;