Bez: Generating a browser engine from specs and tests
Bez is an experimental project that automatically generates a web rendering engine from W3C specifications and test suites using AI models cross-checked against major browsers.
summary is enough The concept is fascinating, but the project is at an extremely early proof-of-concept stage where the summary and discussion capture its core challenges.
summary
Bez aims to bypass the massive manual effort of building web engines by automatically generating code from specifications and web platform tests. It uses language models to propose code candidates, which are then verified using a three-browser voting oracle across Chromium, Firefox, and WebKit. While early tests successfully generated a handful of CSS rules and found real browser bugs, active engine developers on Hacker News remain deeply skeptical that models can produce performant, architecturally sound engines.
key points
- Bez uses AI models to generate rendering rules, verifying them against a three-browser majority vote and WPT test suites.
- The architecture supports tree-shaking unused web features to build extremely small, content-scoped engines for desktop apps.
- Early runs have successfully generated nine CSS 2.1 layout rules and exposed a real-world sub-pixel rounding discrepancy in Firefox.
who should read it
Systems engineers, browser developers, and engineers tracking AI-assisted code generation limits.
discussion mixed
consensus
Commenters are intrigued by the ambitious concept, but browser developers push back heavily, noting that AI-generated code tends to be architecturally wrong and far too slow for a browser engine.
pushback
A minority view argues that software architecture and performance are not formally part of web specifications, implying code generation could theoretically bypass human structural design.
As someone who has spent the last 3 years implementing a browser engine from scratch full time (that currently passes ~half the 200k "css" tests that test style/layout/rendering), I find that (without a lot of close hand holding) the AIs are very far from being able to do this. They'll give you something that passes the tests, but it will do it a ridiculous way be far too slow to be useful (and is wrong architecturally such that it's not going to converge on a better solution).
An experienced browser engine author explains from practical experience why AI-generated rendering code fails on performance and architectural soundness.
Generated by an LLM from the article and thread. Check the sources before relying on it.