Skip to main content

open_url

Function open_url 

Source
pub fn open_url(url: &str) -> Result<()>
Expand description

Open a URL in the system’s default browser.

Dispatches to the platform-appropriate opener:

  • macOS: open
  • Linux / BSD: xdg-open
  • Windows: rundll32 url.dll,FileProtocolHandler
  • Other: returns an error.

This is the single entry point for URL opening — every call site in the codebase should use this instead of hardcoding Command::new("open"), Command::new("xdg-open"), or Command::new("cmd").