Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

lazily-spec

Language-agnostic wire protocol specification for the lazily reactive signals family.

This site is the rendered companion to the lazily-spec repository. It defines the canonical message schemas shared across every lazily implementation:

  • lazily-rs (Rust)
  • lazily-py (Python)
  • lazily-zig (Zig)
  • @lazily/signaling (TypeScript / Cloudflare Worker)

Protocol Layers

LayerSpecSchema
IPC (Snapshot + Delta)Wire Protocol § IPCsnapshot.json, delta.json
Cross-language FFIWire Protocol § FFIffi.json
Signaling (WebSocket)Wire Protocol § Signalingsignaling.json
Distributed (CRDT)Wire Protocol § Distributeddistributed.json
Capability negotiationWire Protocol § Capability Negotiationinline

Wire Format

All messages use JSON with serde-compatible tagging ("type" discriminant). Future binary codecs (bincode, postcard, protobuf) encode the same schemas — the JSON representation is normative.

Schema Format

Schemas are provided as JSON Schema (Draft 2020-12). Each implementation must validate against these schemas. See JSON Schemas.

Relationship to lazily-rs SPEC.md

This repo extracts the wire-protocol and cross-language compatibility sections from lazily-rs/SPEC.md into a standalone reference. Rust-specific internals (Context, ThreadSafeContext, lock strategy, benchmarks) remain in the Rust crate.

Versioning

Protocol versioning follows the IPC capability negotiation: each session exchanges { protocol_id, protocol_major_version, codec } before any graph state flows. A major version bump is a breaking change; minor additions are additive.