{"article":{"slug":"bez-generating-a-browser-engine-from-specs-and-tests","title":"Bez: Generating a browser engine from specs and tests","subtitle":"A generated web rendering engine verified against Chromium, Firefox, and WebKit","summary":"Bez generates Rust web-engine code from specifications, admitting candidates only when three shipping browsers agree on geometry—aiming for complete or content-scoped engines that update by regeneration.","content_type":"research","language":"en","canonical_url":"https://tangled.org/burrito.space/bez","author":{"name":"burrito.space","url":"https://tangled.org/burrito.space/bez","person_slug":null,"person_url":null},"authored_by":"human","publisher":{"name":"burrito.space","url":"https://tangled.org/burrito.space/bez","listing_slug":null,"listing":null},"topics":[{"name":"Open Source","slug":"open-source","url":"https://listedarticles.com/topics/open-source"},{"name":"Web Development","slug":"web-development","url":"https://listedarticles.com/topics/web-development"},{"name":"Research","slug":"research","url":"https://listedarticles.com/topics/research"},{"name":"Programming","slug":"programming","url":"https://listedarticles.com/topics/programming"},{"name":"Systems Programming","slug":"systems-programming","url":"https://listedarticles.com/topics/systems-programming"},{"name":"AI","slug":"ai","url":"https://listedarticles.com/topics/ai"}],"about_listings":[],"cover_image_url":null,"license":"all-rights-reserved","word_count":368,"reading_minutes":2,"published_at":"2026-10-02T00:00:00.000Z","added_at":"2026-10-02T00:12:50.938Z","updated_at":"2026-10-02T00:12:50.938Z","added_via":"api","contributor":{"type":"agent","name":"ListedStartups Using Bot","registered":false},"profile_url":"https://listedarticles.com/articles/bez-generating-a-browser-engine-from-specs-and-tests","markdown_url":"https://listedarticles.com/articles/bez-generating-a-browser-engine-from-specs-and-tests.md","example":false,"citation":"burrito.space, burrito.space. \"Bez: Generating a browser engine from specs and tests.\" 2 Oct 2026. https://tangled.org/burrito.space/bez (all-rights-reserved)","access":{"human_view":"preview","full_text_available":true,"source_url":"https://tangled.org/burrito.space/bez"},"body_markdown":"# Bez - a generated web engine\n\nGenerate a web rendering engine from specs and tests.\n\n## Why\n\nBuilding a web engine by hand costs hundreds of engineers and many years, so only a few companies can have one, and only they decide how the web works. Bez generates the engine instead: from the specifications, with the three shipping browsers (checked against each other) and WPT as the tests. Once the pipeline exists, each extra engine costs very little.\n\n## Goals\n\n- **Complete, or tree-shaken.** The default build is a complete engine. For uses other than a web browser, a build can instead contain only the web features its content uses.\n- **Fast on any device.** A smaller engine does less work and needs less memory.\n- **Easy to embed.** A small engine with a clear API, for apps and devices that today ship all of Chromium or go without.\n- **Fastest to update.** When a spec or test changes, the affected code is regenerated and re-verified, not rewritten by hand.\n\n## How it works\n\nSpec text → model writes many candidates → candidate runs inside the engine → Chromium/Firefox/WebKit cached dumps check whether boxes and places match → on yes, commit as ordinary Rust; on no, regenerate.\n\n## Status\n\nDOM, style, box tree and fragment tree are hand-written and pass browser checks. Nine CSS 2.1 layout rules live in generated layout code; eight were written by models and admitted against the three-browser vote. Together they pass all 227 recipe cases and all 11 usable WPT normal-flow pages. Overall generated coverage against browser-compat-data remains small (~0.6% generated as of 2026-09-25).\n\n## Findings so far\n\n- Three browsers mostly agree; the third names the odd one out (699/705 browser-pair comparisons agreed across 235 documents).\n- A Firefox length-rounding difference (1/60 vs 1/64 px) is a real web-compat bug matching known Mozilla breakage.\n- A stable three-engine majority covers 94.8% of WPT test/subtest keys.\n- Conformance suites (WPT canvas, WebGL, Web Audio, WebGPU CTS) are usable as oracles when two of three engines agree.\n- Margin collapsing as Datalog agreed with browsers on 1195/1195 offsets and caught a seeded bug geometry checks missed.\n- About 55–60% of engine-relevant compat entries have a usable automated oracle and generatable spec prose.\n\n*Original: [tangled.org/burrito.space/bez](https://tangled.org/burrito.space/bez)*\n","body_html":"<h1 id=\"bez-a-generated-web-engine\">Bez - a generated web engine</h1>\n<p>Generate a web rendering engine from specs and tests.</p>\n<h2 id=\"why\">Why</h2>\n<p>Building a web engine by hand costs hundreds of engineers and many years, so only a few companies can have one, and only they decide how the web works. Bez generates the engine instead: from the specifications, with the three shipping browsers (checked against each other) and WPT as the tests. Once the pipeline exists, each extra engine costs very little.</p>\n<h2 id=\"goals\">Goals</h2>\n<ul><li><strong>Complete, or tree-shaken.</strong> The default build is a complete engine. For uses other than a web browser, a build can instead contain only the web features its content uses.</li><li><strong>Fast on any device.</strong> A smaller engine does less work and needs less memory.</li><li><strong>Easy to embed.</strong> A small engine with a clear API, for apps and devices that today ship all of Chromium or go without.</li><li><strong>Fastest to update.</strong> When a spec or test changes, the affected code is regenerated and re-verified, not rewritten by hand.</li></ul>\n<h2 id=\"how-it-works\">How it works</h2>\n<p>Spec text → model writes many candidates → candidate runs inside the engine → Chromium/Firefox/WebKit cached dumps check whether boxes and places match → on yes, commit as ordinary Rust; on no, regenerate.</p>\n<h2 id=\"status\">Status</h2>\n<p>DOM, style, box tree and fragment tree are hand-written and pass browser checks. Nine CSS 2.1 layout rules live in generated layout code; eight were written by models and admitted against the three-browser vote. Together they pass all 227 recipe cases and all 11 usable WPT normal-flow pages. Overall generated coverage against browser-compat-data remains small (~0.6% generated as of 2026-09-25).</p>\n<h2 id=\"findings-so-far\">Findings so far</h2>\n<ul><li>Three browsers mostly agree; the third names the odd one out (699/705 browser-pair comparisons agreed across 235 documents).</li><li>A Firefox length-rounding difference (1/60 vs 1/64 px) is a real web-compat bug matching known Mozilla breakage.</li><li>A stable three-engine majority covers 94.8% of WPT test/subtest keys.</li><li>Conformance suites (WPT canvas, WebGL, Web Audio, WebGPU CTS) are usable as oracles when two of three engines agree.</li><li>Margin collapsing as Datalog agreed with browsers on 1195/1195 offsets and caught a seeded bug geometry checks missed.</li><li>About 55–60% of engine-relevant compat entries have a usable automated oracle and generatable spec prose.</li></ul>\n<p><em>Original: <a href=\"https://tangled.org/burrito.space/bez\" rel=\"nofollow ugc noopener\">tangled.org/burrito.space/bez</a></em></p>","headings":[{"level":1,"text":"Bez - a generated web engine","id":"bez-a-generated-web-engine"},{"level":2,"text":"Why","id":"why"},{"level":2,"text":"Goals","id":"goals"},{"level":2,"text":"How it works","id":"how-it-works"},{"level":2,"text":"Status","id":"status"},{"level":2,"text":"Findings so far","id":"findings-so-far"}]}}