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
| Layer | Spec | Schema |
|---|---|---|
| IPC (Snapshot + Delta) | Wire Protocol § IPC | snapshot.json, delta.json |
| Cross-language FFI | Wire Protocol § FFI | ffi.json |
| Signaling (WebSocket) | Wire Protocol § Signaling | signaling.json |
| Distributed (CRDT) | Wire Protocol § Distributed | distributed.json |
| Capability negotiation | Wire Protocol § Capability Negotiation | inline |
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.