Urgent.News

What's breaking now, across thousands of outlets.

Tech

Bez: Generating a browser engine from specs and tests

Bez generates a web rendering engine from specifications and tests. Building a web engine from scratch would usually require hundreds of engineers and years of work, so only a few companies possess one, controlling how the web functions. Bez circumvents this by creating the engine based on specifications, utilizing the three main shipping browsers for comparison and WPT as the tests. Once the pipeline is established, adding additional engines incurs minimal cost.

The engine's DOM, style, box tree, and fragment tree are hand-written in specific crates. These components successfully pass browser checks. There are nine CSS 2.1 layout rules contained in crates/layout/src/generated, with eight rules derived from models after receiving approval from the three-browser vote. One rule remains hand-written due to no model candidate surpassing it. Together, these components pass all 227 recipe cases and all 11 functional WPT normal-flow pages.

The specifics of which rules the engine calls, the resolver associated with each generated function, and what would validate this thesis are outlined in roadmap.md. The proof of concept is also discussed in this document. The cost of building each rule manually, the scale of the generated part of a feature, the portion of WPT accessible without JavaScript, and where IDL-generated code concludes are summarized in roadmap.md → Open questions. The status of each area is documented in docs/platform-areas.md.

Written by urgent.news from Hacker News's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at tangled.org →

More in Tech

More from Thursday 1 October →