Bez: A Pipeline for Generating Web Rendering Engines from Specs and Tests
Key point
The Bez project automates web engine development by using LLMs to generate Rust code validated against Chromium, Firefox, and WebKit, currently achieving 0.6% overall coverage.
Details
Automated Engine Generation Pipeline
The Bez project establishes a pipeline to generate web rendering engines directly from specifications and tests, aiming to minimize the engineering cost associated with traditional browser development. The workflow involves feeding spec text to a model to produce candidate implementations, which are then executed and compared against Chromium, Firefox, and WebKit. If the outputs match across these browsers, the code is committed as standard Rust.
Current Implementation Status
As of 2026-09-25, the project reports the following coverage metrics based on browser-compat-data 8.0.4:
- Overall Coverage: 0.6% generated, 0.3% hand-written, 93.0% unreached.
- CSS Coverage: 2.5% generated, 94.4% unreached.
- Other Areas: HTML, JavaScript, SVG, WebAssembly, HTTP, and MathML remain at 0.0% generated coverage.
Core components like DOM, style, box tree, and fragment tree are currently hand-written in crates/dom and crates/layout. In crates/layout/src/generated, 9 CSS 2.1 layout rules exist; 8 were generated by the model and adopted via browser voting, while the block height rule remains hand-written because model candidates failed to outperform existing logic. These generated rules pass 227 recipe cases and 11 usable WPT normal-flow pages.
Key Findings and Validation
The project highlights high consistency among the three major browsers, with 699 out of 705 browser pair comparisons matching across 235 documents. Discrepancies often stem from known web-compat bugs, such as Firefox's rounding of lengths to 1/60 px versus Blink/WebKit's 1/64 px.
- WPT Coverage: Majority voting across three engines covers 94.8% of 2,282,301 test/subtest keys.
- Conformance Suites: These serve as useful oracles, with Khronos WebGL showing 99.7% consistency and WPT canvas at 82.6% (rising to 92.7% excluding tentative tests).
- Economic Viability: Approximately 55–60% of engine-related compatibility entries have automated oracles and generatable spec prose, suggesting a feasible path for automated expansion.
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.