Skip to main content

Contributing

The repository is dziry-dev/dziry. It contains the compiler and runtime (TypeScript, under src/), the native engine (Rust, under native-src/dziry-engine/), the docs site (docs/), and the verification tooling (guards/ and scripts/).

Setup​

git clone https://github.com/dziry-dev/dziry
cd dziry
bun install
bun run engine # build the Rust engine (requires a Rust toolchain)
bun run window # compile the demo window
bun run dev # open it

In a checkout, CLI commands are bun run cli <command> — the dziry bin belongs to installed apps.

To test a change against a real app, scaffold one that depends on your checkout instead of the published package:

bun create dziry test-app --local ../dziry # add --no-install to skip installing

The test suite​

bun run test # bun test + cargo test
bun run check # tsc over src, scripts, windows, and architecture
bun run lint # cargo fmt --check && clippy

Run these before any commit that touches more than one area.

The design rule​

Nothing stays dynamic unless it is proven it must.

Before adding anything to the runtime — a per-frame cost, runtime state, a new entry in the shared-memory schema — ask whether the work can happen at build time instead. bun run runtime-surface enforces this as a ratchet: the runtime's exported symbols and bundled bytes may fall freely, but may not rise without editing the baseline in the same commit.

The guard scripts​

Each guard proves one thing. Several use a browser or mdn-data as an oracle, comparing Dziry against an external authority rather than against itself:

RunProvesOracle
bun run protocol-guard
Protocol identity
Proves the shared-memory protocol's two halves still agree — offsets, field identity, enums, FFI symbols.—
bun run boundary-diff
Boundary sanity
Validates the tables Bun is about to hand the engine: link consistency, index ranges, sibling cycles, arena bounds.—
bun run characterize
Compiler output frozen
Golden files of compiled output, so a refactor is provably behaviour-preserving.—
bun run golden
Visual regression
Renders scenarios headlessly and compares against blessed PNGs.—
bun run conformance
CSS conformance
Compiles a declaration and compares the emitted value with what the browser computes.headless Chrome
bun run layout-diff
Layout conformance
Lays out the same html+css in dziry and in the browser at the same viewport, then compares every box.headless Chrome
bun run spec-audit
Initial values
Checks computed-style defaults and inheritance flags for every style field.mdn-data
bun run css-coverage
Coverage, measured
What CSS exists versus what dziry supports, bucketed as supported / unsupported / committed non-goal.mdn-data
bun run tailwind-coverage
Tailwind coverage
What fraction of Tailwind works, and what is blocking the rest ranked by classes unblocked.—
bun run html-coverage
Element defaults
How each HTML element renders in dziry versus the browser — the table that specifies the UA stylesheet.headless Chrome
bun run doc-lint
Citations resolve
Verifies that every `file.ext:LINE` citation in the Markdown docs still points at something.—
bun run probe
Browser facts
Measures what a browser actually does over CDP, so behaviour claims are recorded rather than remembered.headless Chrome

Two more that are not in that table:

RunProves
bun run docs-checkDoc examples compile against the real types; the public API is covered; frontmatter is present.
bun run arch:checkThe architecture map still matches the repository. --emit regenerates the diagram data.

Which guard to run​

You changedRun
A CSS property, or STYLE_FIELDSconformance, spec-audit, css-coverage
src/protocol/schema.tsprotocol-guard
Anything in src/compiler/characterize first, to freeze the current output
paint.rs, layout.rs, text.rsgolden
Taffy style construction, sizing, wrappinglayout-diff
The emitter, list splicing, relinking, hiddenboundary-diff
The authoring API in src/index.tsdocs-check
Any doc, or any file a doc citesdoc-lint

Claims and measurements​

Prefer running the relevant script to quoting a number found in prose. For coverage in particular, bun run tailwind-coverage is the measurement; a percentage written in a document is only a record of one.

Working on docs​

The docs site is docs/, and it is built rather than merely written: a citation that no longer resolves fails bun run docs:build, and so does an example that no longer compiles.

bun run docs # dev server; citations warn instead of failing
bun run docs-check # examples, API coverage, frontmatter
bun run docs:build # the gate: doc-lint + docs-check + build

See Writing docs for the conventions.