burrito.house/bez at foremost · Tangled


Generate an internet rendering engine from specs and checks.

Why#

Building an internet engine by hand prices lots of of engineers and a few years, so just a few
firms can have one, and solely they determine how the net works. Bez generates the engine
as an alternative: from the specs, with the three delivery browsers (checked in opposition to every
different) and WPT because the checks. Once the pipeline exists, every additional engine prices very
little.

Goals#

  • Complete, or tree-shaken. The default construct is an entire engine. For makes use of
    aside from an internet browser, a construct can as an alternative comprise solely the net options its
    content material makes use of: analyse a web site or an app, and each characteristic it by no means touches is disregarded
    of the binary, not simply switched off (docs/content-scoped-engine.md).
  • Fast on any system. A smaller engine does much less work and wishes much less reminiscence.
  • Easy to embed. A small engine with a transparent API, for apps and gadgets that right this moment ship
    all of Chromium or go with out.
  • Fastest to replace. When a spec or check adjustments, the affected code is regenerated and
    re-verified, not rewritten by hand.

How it really works#

flowchart LR
  spec["spec text"] --> mannequin["model writes
many candidates"] mannequin --> engine["candidate runs
inside the engine"] browsers["Chromium, Firefox,
WebKit (cached)"] --> test{"similar containers,
similar locations?"} engine --> test test -- no --> mannequin test -- sure --> code["committed as
ordinary Rust"]

Status#

Computed in opposition to browser-compat-data 8.0.4 (17259 leaf keys, 74 guidelines in docs/feature-map.json) on 2026-09-25.

space generated hand-written linked oracle solely unreached
total 0.6% 0.3% 0.5% 5.7% 93.0%
css 2.5% 1.1% 2.0% 0.0% 94.4%
html 0.0% 0.0% 0.0% 0.0% 100.0%
api 0.0% 0.0% 0.0% 9.9% 90.1%
javascript 0.0% 0.0% 0.0% 0.0% 100.0%
svg 0.0% 0.0% 0.0% 0.0% 100.0%
webassembly 0.0% 0.0% 0.0% 0.0% 100.0%
http 0.0% 0.0% 0.0% 0.0% 100.0%
mathml 0.0% 0.0% 0.0% 0.0% 100.0%

See docs/dashboard.md for what these statuses imply and the way this desk is saved in sync.

DOM, type, field tree and fragment tree are hand-written in crates/dom and
crates/layout and move their browser checks
(roadmap.md → “Phase 1 — Engine bootstrap”).
Nine CSS 2.1 structure guidelines dwell in
crates/layout/src/generated; eight had been written by
fashions and admitted in opposition to the three-browser vote, and block peak retains its
hand-written rule as a result of no mannequin candidate beat it. Together they move all 227 recipe
instances and all 11 usable WPT normal-flow pages. Which guidelines the engine truly calls:
roadmap.md → “Which resolver each generated function runs”.
What would show the thesis:
roadmap.md → “Proof of concept”.

Findings to this point#

  • Three browsers principally agree, and the third names the odd one out. 699 of 705
    browser-pair comparisons agreed throughout 235 paperwork (commit 3ca7323); all six
    disagreements had been twelve-deep proportion nesting, and majority voting named Firefox
    the outlier each time. docs/firefox-app-units.md.
  • That Firefox distinction is an actual web-compat bug. Gecko rounds lengths to 1/60 px
    the place Blink and WebPackage use 1/64 px, which makes a flex merchandise wrap solely in Firefox or
    offsetWidth differ by a pixel. Reproductions match Mozilla-diagnosed breakage on
    Slack, Google Store and Samsung, and Mozilla bug 1719314.
    experiments/firefox-compat/.
  • The WPT vote desk agrees throughout a lot of the suite. A steady three-engine majority
    covers 2,162,676 of two,282,301 check/subtest keys (94.8%). docs/wpt-votes.md.
  • Script-observable behaviour agrees too. Trace probes underneath a fake-media profile
    agree on 15 of 18 engine pairs; the three disagreements are an actual platform distinction.
    docs/dump-format.md → “Trace protocol”.
  • Conformance suites are usable oracles. Counting a check usable when two of three
    engines agree: WPT canvas 82.6% (92.7% excluding tentative), Khronos WebGL with dEQP
    99.7%, WPT Web Audio 74.4% (85.6% excluding tentative); the WebGPU CTS about 85% for
    validation and about 50% for numeric execution.
    docs/conformance-oracles.md, docs/webgpu-cts.md.
  • Logic programming earns a slender place. Margin collapsing written as Datalog agreed
    with the browsers on 1195 of 1195 offsets and caught a seeded bug the geometry test
    missed in all 227 instances. docs/logic-layer.md.
  • The economics maintain for a subset of the platform. About 55–60% of engine-relevant
    compat entries have a usable automated oracle and generatable spec prose; roughly 8–18%
    have none. docs/platform-economics.md,
    docs/oracle-coverage.md.
  • An engine scoped to at least one web site’s content material is designed, and its content material analyser has
    landed. docs/content-scoped-engine.md.

Open questions#

What constructing every rule prices by hand, how large a characteristic’s generated half must be,
how a lot of WPT is reachable with out JavaScript, and the place IDL-generated code ends:
roadmap.md → “Open questions”. Area-by-area standing:
docs/platform-areas.md.

Sources#



Source link