Runtime & Layout
Rezi's runtime turns state into frames through a deterministic pipeline. This page is an index for the runtime internals and the layout model used across widgets.
Rezi's runtime turns state into frames through a deterministic pipeline. This page is an index for the runtime internals and the layout model used across widgets.
Runtime pipeline
Runtime phases
- Reconciliation: compares the new VNode tree to the previous one and computes changes.
- Layout: resolves sizes and positions in terminal cell units.
- Rendering: builds ZRDL drawlists and submits them to the backend.
- Event dispatch: parses ZREV batches and routes input to widgets or global handlers.
Layout model
Layout is cell-based and deterministic. Stacks (row, column) and constraints (width, height, flex) are the core primitives.
Input & focus
Focus routing and key handling are part of the runtime contract.
Update contract
Update batching, commit points, and runtime error codes are defined in the lifecycle guide.
Protocol boundary
The runtime talks to the engine over ZRDL and ZREV.
Composition
Rezi supports reusable, stateful widgets via defineWidget. Composite widgets integrate with the runtime's reconciliation and update pipeline while keeping your view pure.
Lifecycle & Updates
This guide explains how a Rezi app moves through its lifecycle, how updates are committed, and what “deterministic scheduling” means in practice.