Spokes.wiki Search About
Software Source Code source ↗ source url updated Thu Jun 18 2026 00:00:00 GMT+0000 (Coordinated Universal Time)

YaFF (zero-copy serialization)

Yandex’s C++ zero-copy serialization library for the Protobuf ecosystem (Apache-2.0). “Yet another Flat Format” keeps your .proto files as the authoritative schema but replaces Protobuf’s runtime parse step with an mmap-compatible flat layout read directly from the buffer — field access without deserialization, approaching native C++ struct speed. The serialization / data-interchange layer of developer-tooling.

What it is

  • Zero-copy, mmap-compatible layout — the FlatBuffers lineage (“eliminate parsing entirely”), but inside the Protobuf ecosystem: existing .proto schemas and Protobuf semantics are respected.
  • Adaptive layouts — unlike FlatBuffers’ single fixed layout, YaFF supports multiple runtime representations of one schema, each tuned to an access pattern (the distinguishing bet).
  • Incremental adoption — two-way conversion between YaFF and ordinary Protobuf messages, so a codebase can migrate hot paths without a rewrite. Server-side focus; columnar layouts and multi-language bindings are on the roadmap.

Maturity — record the weakness

Very early: v0.1.0, ~2 commits, 186★ (June 2026). The design goals are clear but unproven; no independent benchmarks, and the adaptive-layout and roadmap features are mostly aspirational. Ingested with the immaturity recorded per the quality gate.

Why it’s here — the zero-copy edge of the thread

YaFF is the spoke’s serialization corner and the purest version of the founding pattern (synthesis): win performance by removing a layer of overhead — here the deserialization step itself, in C++. Compare typescript-7-go-compiler (remove interpreter overhead via Go) and lore (remove Git’s binary-asset cost via Rust): different layers, same “drop the dominant runtime cost in a systems language” move.

Tier

T1 — first-party Yandex repo. freshness: volatile — pre-alpha; expect rapid change.

Serialization sibling

clickhouse-rowbinary is the spoke’s other serialization source — a different bet on the same layer: YaFF drops the deserialization step (mmap flat layout, C++); RowBinary keeps a compact varint format but drops the dispatch cost by generating specialized parsers (JS). Zero-copy vs. specialized-codegen, both chasing “parse cost → ~zero.”

developer-tooling · clickhouse-rowbinary · monomorphization · typescript-7-go-compiler · lore · synthesis