proofsheet-core
The engine behind proofsheet: exact-pixel App Store and Google Play screenshots from a real browser, deterministic and local-first.
This crate is the library. For the command-line tool, install
proofsheet.
[]
= "0.1"
use ;
let presets = builtin;
let report = run?;
// `ok`, not `failed == 0` -- the latter is also true when nothing was captured.
assert!;
What it does that a screenshot script doesn't
Exact pixels by construction. A preset stores the output size the store
requires and derives the viewport as output / scale. A preset whose output
doesn't divide evenly is rejected at parse time, so "the size we emit is a size
the store accepts" is structural rather than arithmetic someone got right.
Deterministic runs. A preamble injected before any page script seeds
Math.random, freezes Date.now and performance.now, drives
requestAnimationFrame on a fixed virtual step, and pins locale and timezone
through CDP. Same seed, byte-identical PNGs.
Wrong-layout detection. A page can be captured at exactly the right pixel
count and still show a desktop layout scaled into a phone frame. Every
Capture carries an Environment recording what the page actually did —
assert on viewport_honoured, not just the dimensions.
No async runtime, no browser automation framework, no HTTP client. The
WebSocket and CDP client are hand-rolled std.
Documentation
Full docs, device tables and examples: github.com/interchained/proofsheet
License
BUSL-1.1, converting to MIT on 2030-08-22. Property made in part by Interchained LLC Labs.