Expand description
Downloading a known-good browser.
§Why this exists
Every other part of proofsheet is deterministic, and then the first run on a fresh machine fails because there is no Chrome. “Install Chrome” is a surprisingly bad instruction: a desktop Chrome auto-updates underneath you, so the browser producing your screenshots changes without you asking, and the images churn. Chrome for Testing exists precisely to be pinned.
§Why it shells out
Fetching over HTTPS from Rust means a TLS stack, and unzipping means an
inflate implementation. This crate deliberately has neither – it hand
rolls its WebSocket rather than take the dependency. curl is present on
macOS, Windows 10+ and effectively every Linux, and one of unzip / tar /
python3 / PowerShell is always there too. Shelling out keeps the
dependency tree empty at the cost of an honest runtime requirement, and
the failure mode is a clear message rather than a link error.
The download is verified by running the binary and reading its version back. A truncated or wrong-architecture download otherwise surfaces much later, as a confusing browser launch failure.
Functions§
- install_
browser - Download a pinned Chrome for Testing headless shell.
- installed_
version - What
install_browserreported, for printing. - latest_
stable_ version - The current Stable version, as Chrome for Testing reports it.
- managed_
root - Where a managed browser is installed.