Skip to content
uencoder

Cap'n Proto

Cap'n Proto is a zero-copy serialization format designed by Kenton Varda: the in-memory layout of data is the wire format, so no encoding/decoding step exists.

Purpose

It eliminates serialization overhead in extremely low-latency scenarios by reading and writing memory-mapped regions directly.

Mechanism

Structured data is laid out as pointers and fixed-width fields in contiguous memory, and the wire format equals the memory layout. Readers traverse pointers without decoding.

Use cases

  • Low-latency RPC
  • Real-time game communication
  • High-performance IPC

Related tools

References