HeadlinesBriefing HeadlinesBriefing.com

Bez: Generating a browser engine from specs and tests

Hacker News •
×

Bez generates a web rendering engine from specifications and tests, rather than building one by hand. The project aims to reduce the cost of creating a browser engine, which currently requires hundreds of engineers and years of work. By generating code from specs and using the three shipping browsers (Chromium, Firefox, WebKit) along with WPT as tests, each extra engine costs very little.

Goals include a complete or tree-shaken build, fast performance on any device, easy embedding, and fastest updates when specs change. The generation loop involves writing candidates from spec text, running them inside the engine, and checking against the three browsers for agreement on boxes and placement. Only when all three agree is the code committed as ordinary Rust.

Current status shows 0.6% of features generated overall, with CSS at 2.5%. Nine CSS 2.1 layout rules live in the generated code; eight were written by models and admitted against the three-browser vote. 699 of 705 browser-pair comparisons agreed across 235 documents, with Firefox identified as the outlier in all six disagreements, revealing a real web-compat bug.

Source: Hacker News · Summarized by HeadlinesBriefing