Backends & Resolution
shirabe drives any browser that speaks the Chrome DevTools Protocol — Google
Chrome, Chromium, Microsoft Edge — through one CDP engine. Select one with
SHIRABE_BACKEND:
| Value | Backend |
|---|---|
chrome (default in auto) | Google Chrome |
chromium | Chromium |
edge | Microsoft Edge |
auto (default) | Try Chrome, then Chromium, then Edge |
Resolution order
Whichever backend is chosen, shirabe resolves an executable in this order (mirroring ort's dependency model):
- Backend-specific override —
CHROME_PATH/CHROMIUM_PATH/EDGE_PATH. If set, the path is authoritative; a missing path is a hard error. - Build-time baked path —
SHIRABE_BROWSER_PATH, emitted bybuild.rswhen the `auto-fetch` feature downloads the pinned Chrome for Testing build into the shared cache during compilation. - System binary on
$PATHplus a handful of well-known install locations (`/usr/bin/google-chrome`, `/Applications/Google Chrome.app/...`, `C:\Program Files\Google\Chrome\Application\chrome.exe`, …). - Runtime fetch (the
runtime-fetchfeature) — download the pinned Chrome for Testing build on first use into the cache.
Download knobs
The fetch step honours these environment variables, both at build time
(build.rs) and at runtime:
| Env | Purpose |
|---|---|
SHIRABE_CHROME_VERSION | Override the pinned Chrome for Testing version. |
SHIRABE_CHROME_MIRROR | Download from a mirror (e.g. a GFW-friendly one) instead of the default Google host. |
SHIRABE_CHROME_SHA256 | Optional hex checksum; the download is verified against it. |
SHIRABE_DOWNLOAD_PROXY | Route the download through an http://, https:// or socks5:// proxy. |
SHIRABE_DOWNLOAD_TIMEOUT_SECS | Per-request timeout (default 600). |
SHIRABE_SKIP_BROWSER_FETCH | Skip both build-time and runtime downloads. |
Because
build.rsreads these too, a downstream crate can pin the whole toolchain in CI with oneenv:block.