How krishnav2/browser-url works
browser-url is a small Rust library that detects the focused window, classifies recognized browsers, and extracts URL and window metadata. The documented workflow is implemented by the public API, browser classifier, platform dispatcher, and Windows UI Automation extractor. macOS and Linux are explicitly planned but not implemented; the graph omits those branches. Edges reflect the sampled calls and README documentation.
Main entry points: lib.rs Active browser API · url_extraction.rs Platform dispatcher · windows.rs Windows UI extraction · browser_detection.rs Browser classifier
Components 9
Public API
- Active browser API
src/lib.rs - Active window lookup
src/lib.rs
Browser Detection
- Browser classifier
src/browser_detection.rs
URL Extraction
- Platform dispatcher
src/url_extraction.rs - Windows UI extraction
src/platform/windows.rs
Results and Errors
- Browser information
src/lib.rs - API errors
src/error.rs
Other components
- Library caller
- Windows UI Automation
Connections 12
- Library caller → Active browser API: calls
src/lib.rs - Active browser API → Active window lookup: queries
src/lib.rs - Active browser API → Browser classifier: classifies window
src/lib.rs - Active browser API → Platform dispatcher: requests URL
src/lib.rs - Active window lookup → Active browser API: returns window data
src/lib.rs - Browser classifier → Active browser API: returns browser type
src/lib.rs - Platform dispatcher → Windows UI extraction: dispatches on Windows
src/url_extraction.rs - Windows UI extraction → Windows UI Automation: queries controls
src/platform/windows.rs - Windows UI extraction → Platform dispatcher: returns URL
src/url_extraction.rs - Active browser API → Browser information: assembles result
src/lib.rs - Active browser API → API errors: returns failures
src/lib.rs - Platform dispatcher → API errors: returns platform errors
src/url_extraction.rs