glance: design
glance is an accessibility-rule engine whose rules run in Rust compiled to
wasm32-unknown-unknown, over a snapshot of the page read in one pass. Its public interface
follows axe-core 4.14.1; docs/COMPAT.md lists what is implemented and every difference. It is written clean-room: the
specification in spec/ was produced from public documentation, W3C
standards and black-box behaviour, and the implementation was written from that
specification.
Behaviour differences: COMPAT.md.
Chapters
- The interface glance matches
- Architecture: collector, core, API layer, builds.
- Where the speed comes from: mechanism, predicted numbers, risks.
- Proof plan: ACT test cases, the differential suite, the reference's fixtures run from CI, Rust tests, negative controls.
- Phased plan
- Where the reference spends its time: the black-box profile behind the decision to start.
- Benchmark method
- Module contracts: layout, snapshot, Host, facts, rules, results, rules.json.
- Live in-browser comparison: the site's demo plan.
Decisions in one place
- Reference: axe-core 4.14.1. MVP: the 70 rules tagged wcag2a, wcag2aa, wcag21a, wcag21aa or wcag22aa.
- One in-page walk builds the snapshot; everything else is read lazily through the Host trait and memoised, so no fact is fetched twice.
- The core is pure Rust (
no_std+alloc); the browser is behind one trait. - Colour contrast composes backgrounds from the snapshot and hit-tests only overlapping runs.
- rules.json is the single source for rule metadata and messages.
- Unimplemented rules are absent, never reported as passing.