This repository has no description
bez docs blitz-comparison.md
8.2 kB
Markdown
at main

Blitz compared with this engine #

Blitz (https://github.com/DioxusLabs/blitz) read at commit 17de049 (2026-10-18), from source, its README and its issue tracker; nothing of it was built or run. Blitz paths are relative to its repository root. Claims marked inferred were reasoned, not read.

Side by side #

Area Blitz This engine
DOM blitz-dom: node arena, events, forms, accessibility (packages/blitz-dom/src/node/, events/) crates/dom (style.rs, node.rs, mutable.rs); a styled document is immutable (roadmap.md → "Realtime performance")
Style Stylo 0.22; blitz-dom/src/stylo.rs implements selectors::Element and RecalcStyle; stylo_taffy TaffyStyloStyle maps computed values to Taffy styles Stylo =0.21.0, pinned with selectors 0.40 and html5ever 0.39 (Cargo.toml); glue adapted from Blitz (crates/dom/src/style.rs, style_data.rs); computed.rs reads properties as enums
Layout Taffy (flexbox, grid, block, calc) plus hand-written inline (layout/inline.rs), tables (layout/table.rs) and replaced elements; floats behind the non-default floats feature (blitz-dom/Cargo.toml) Hand-written walk (crates/layout/src/fragment.rs Resolvers, FormattingContext Block / Inline / FixedTable) plus 15 generated functions in crates/layout/src/generated/
Text Parley 0.12: shaping, line breaking, bidi (stylo_to_parley.rs) No text layout; docs/text-metrics.md: line breaking can be voted on, proportional-font advances cannot (0 of 104 unanimous)
Paint blitz-paint to anyrender: Vello (GPU or CPU), Skia, SVG crates/layout/src/bin/paint.rs: flat rectangles to PNG
Network blitz-net (reqwest, HTTP cache, data URIs) None
Script blitz-vibey-script on Boa 0.22, runs Preact (tests/preact.rs) None; linked subsystem (roadmap.md → "Layering", docs/js-engine-choice.md)
Embedding Winit shell, Dioxus Native, browser app, WebAssembly (HOWTO_WASM.md) crates/webengine lay_out(), a C ABI (webengine_layout), WebAssembly

Establishing correctness #

  • Blitz runs WPT css and svg on every pull request and push (.github/workflows/wpt.yml, cargo run -rp wpt css svg), diffs against main and publishes wptreport.json. Its runner (wpt/runner/src/test_runners/) handles reftests (Vello renders at 800×600, compared with WPT's fuzzy tolerance, ref_test.rs process_ref_test), checkLayout tests (data-expected-* and data-offset-* checked natively without script, attr_test.rs), testharness tests through Boa, and crash tests. Published scores (blitz.is/status/wpt, commit 17de049):

    Scope Interop score Tests passing
    css overall 54.44% 52.57% (18492 of 35171)
    css-flexbox 86.31% 83.76%
    CSS2 73.71% 73.58% (4686 of 6368)
    css-text 71.04% 70.33%
    css-tables 58.74% 52.16%
    css-grid 56.66% 55.00%
  • This engine measures per-box geometry in Chromium, Firefox and WebKit, takes the majority, and compares at 1/60 px (roadmap.md → "Verification strategy", "Geometry mapping"); WPT supplies inputs, never expected outputs (roadmap.md → "Decisions"). Current numbers (docs/geometry-verification.md → "Current numbers"): recipe corpus 227 of 227, held-out WPT normal-flow pages 7 of 7 (only 7 of 1056 pages have no text), grammar corpus 61 of 164. Generated functions on their own corpora, for example floats 109 of 109 and absolute positioning 82 of 108 (docs/generated-functions.md).

Coverage #

Feature Blitz This engine
Block Taffy compute_block_layout Width, margin, height and percentage generated functions
Inline and text Parley; direction block-level only Atomic inlines at font-size: 0 only (generated/inline_atomic.rs)
Floats Supported behind a feature flag Placement generated (generated/float.rs), structure hand-written
Positioning static, relative, absolute, fixed; sticky in progress Relative, absolute, containing block (fixed included); fit-content, max-content and mixed calc() reach generated functions as Unresolved (docs/feature-to-function-design.md)
Flex Taffy None; after text in roadmap.md → "Next"
Grid Mostly; no subgrid (taffy#468) None
Tables Emulated on Taffy grid (table.rs impl taffy::LayoutGridContainer for TableTreeWrapper) Fixed layout only
Other Writing modes partial; transforms and paint effects 2D transforms, stacking order, overflow, aspect-ratio, box generation as generated functions

Performance and size #

Blitz publishes no performance or size figures (issues #255 "Tracking: Optimizations" and #286 "Excessive Memory Usage" carry none); its lockfile holds 986 packages against 328 here. This engine: 8.25 MB stripped shared library, Stylo and its dependencies 56%, layout plus dom 1.9%; the HTML standard's rendering.html lays out in 10.0 ms; the 227 recipe documents take 139 ms, nearly all Stylo setup (roadmap.md → "Substrate rework"). Inferred: Stylo decides binary size in both, so leaving out generated functions saves at most about 1%.

Worth taking #

  1. Blitz's WPT runner pattern as a second, reported score. Its native checkLayout check turns WPT pages with data-expected-* attributes into geometry assertions without script, which could grow the held-out exam well past 7 pages and give a number comparable with Blitz's. Used as a reported score only, never for admission, it keeps "WPT supplies inputs, never expected outputs". Blitz also runs it on every pull request against main; this engine's floors (bench/fragment-floor.sh, bench/generated-scores.sh) cover only its own corpora. The reported score now exists, not yet run per change: docs/wpt-checklayout.md.
  2. Parley for text shaping. Shaping cannot be scored by a three-browser vote (docs/text-metrics.md), so it is a linked subsystem in the class of HarfBuzz and ICU (roadmap.md → "Layering"). Parley gives the line-breaking generated function real advances; Blitz already tests Parley against WPT (docs/parley.md in Blitz). Taken: Parley 0.12 is linked for advance widths (crates/layout/src/text.rs), and its widths are compared with the browsers' in this repository's docs/parley.md. Not yet taken: line breaking and bidi through Parley, and calling it from layout.
  3. Taffy as a further check for flex and grid, consulted where the browser vote is split or missing before batches are drawn, never as engine code (roadmap.md → "Decisions" rejects Blitz's physical-coordinate f32 layout with no computed/used split). Risk: Taffy's own errors would pass as agreed answers. Built as a report, not a tie-break (docs/taffy-check.md): Taffy 0.15.0 matches the browsers' unanimous answer on 98.3% of 13,514 flex and grid measurements, and sides with the pair on 87.8% of the 2–1 ones; only 7 of 653 pages split, so it is not consulted by the vote.

Also of note: Blitz's move to Stylo 0.22 is the migration guide for this engine's next Stylo upgrade (docs/stylo-risk.md plans one release behind Blitz); emulating tables on grid reaches 52% of css-tables cheaply; Blitz ships floats and writing modes behind feature flags until they are good enough.

Deliberate differences #

Generated, specification-literal functions with provenance records instead of hand-written layout; live browsers as the oracle instead of reference images; layout verified without rendering. Blitz's scope is HTML and CSS for applications with browser features opt-in (its README → "Goals").

Risks #

  • Coverage. Blitz renders Wikipedia and Old Reddit today; this engine passes 7 WPT pages and has no text, flex or grid. The gap between the recipe and grammar corpora (227 of 227 against 61 of 164) points at generated functions fitted to their corpora.
  • Paint. Blitz's reftests check painting; the geometry vote never does.
  • Stylo glue. The glue is adapted from Blitz's files, so a large Blitz refactor of stylo.rs raises this engine's upgrade cost (inferred).