Protocol
Event Batches (ZREV)
The engine emits input as a ZREV event batch — a binary format containing one or more input events.
The engine emits input as a ZREV event batch — a binary format containing one or more input events.
Event Types
ZREV batches contain these event record types:
| Record | Description |
|---|---|
| Key | Keyboard input with key code and modifiers |
| Mouse | Mouse events (move, press, release, drag, scroll) with position and button state |
| Resize | Terminal size change |
| Tick | Animation timer |
Mouse Event Records
Mouse records include:
x,y— cursor position in terminal cellsmouseKind— event type: move (1), press (2), release (3), drag (4), scroll (5)mods— modifier keys held (shift, ctrl, alt, meta)buttons— button state bitmaskwheelX,wheelY— scroll deltas
Parsing
Rezi parses ZREV deterministically:
- no reads past buffer end
- no unbounded allocations from untrusted sizes
- explicit, structured errors (no exceptions)
See:
Protocol
Rezi communicates between its TypeScript core and the Zireael C engine through two binary formats: ZRDL (drawlists) and ZREV (event batches). Both formats cross a strict ABI boundary -- the core bu...
Drawlists (ZRDL)
Rezi emits rendering commands as a ZRDL drawlist -- a self-contained binary buffer built in TypeScript and executed by the Zireael C engine. Each frame, the widget renderer produces exactly one dra...