krishnav2/browser-url ? reverse-engineered prompt

Reverse engineered prompt

Build me a small Rust library that can tell me what browser window is currently active and grab the URL from it.

I want a simple API with two functions, one that checks whether the focused window is a browser, and another that returns the current browser details like the URL, page title, browser name, browser type, process ID, and window size and position. It should work well on Windows first, and use native system APIs so it feels fast and lightweight. Support Chrome, Firefox, and Zen to start, and if it’s easy to leave room for Brave and other browsers later that would be great.

Please include a basic example I can run from the command line, plus clear README instructions showing how to add it to a Rust project and use it. If you need to look up current docs for the Windows APIs or Rust crates, go ahead and do that.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab