browser-locations-core
Shared browser executable discovery engine and typed models used by the browser-locations family of crates.
Quick start
use ;
// locate a specific browser + channel
let edge = locate_browser?;
println!;
// discover every installed browser
for loc in discover_installed
Types
| Type | Description |
|---|---|
Browser |
Enum of supported browsers (Arc, Brave, Chrome, Chromium, Edge, Firefox, Floorp, Helium, LibreWolf, Opera, Vivaldi, Zen). Has a Browser::ALL constant. |
ReleaseChannel |
Enum of release channels (Stable, Beta, Dev, Canary, Nightly, Esr, DeveloperEdition, Snapshot, Twilight). |
Platform |
Enum of host platforms (Macos, Windows, Linux). Has Platform::current(). |
ProbeSource |
How a path was found (Override, KnownLocation, PathLookup, Flatpak, Snap). |
BrowserLocation |
A discovered executable: browser, channel, path, platform, source. |
LocateError |
Error enum: UnsupportedChannel, UnsupportedPlatform, NotFound, NoInstalledVariant. |
Functions
| Function | Returns | Description |
|---|---|---|
locate_browser(browser, channel) |
Result<BrowserLocation, LocateError> |
Find a specific browser + channel. |
locate_any_stable(browser) |
Result<BrowserLocation, LocateError> |
Find a browser preferring the most stable channel. |
locate_any_latest(browser) |
Result<BrowserLocation, LocateError> |
Find a browser preferring the newest channel. |
discover_browser(browser) |
Vec<BrowserLocation> |
All installed channels for one browser. |
discover_installed() |
Vec<BrowserLocation> |
All installed executables across every browser. |
Macros
define_getter! — used by per-browser crates to generate channel-specific path getters.
Environment overrides
Set BROWSER_LOCATIONS_{BROWSER}_{CHANNEL}_PATH to override any lookup:
Supported platforms
macOS, Windows, Linux (including Snap and Flatpak installs).