Cap'n Proto

Cap'n Proto

capnproto.org

1

About this website

Cap'n Proto is an insanely fast data interchange format and capability-based RPC system, designed by Kenton Varda (formerly of Google Protocol Buffers team) as a successor to protobuf with dramatically better performance. The key innovation is that Cap'n Proto data is structured in memory exactly as it will appear on the wire, enabling zero-copy serialization and deserialization: reading or writing a message requires no encoding, decoding, or allocation, just a pointer dereference. Benchmarks show Cap'n Proto encoding 20-100x faster than Protocol Buffers and JSON, with virtually zero overhead. The serialization format supports structs with fields (including nested structs, lists, enums, unions, and interfaces), packed encoding (reducing wire size by removing padding bytes), and a schema evolution model allowing forward and backward compatibility (adding new fields without breaking existing readers). The RPC system provides capability-based security (object references as capabilities), promise pipelining (sending requests based on promised results without waiting for round-trips), three-party handoff (transferring capabilities between servers), and level 0-3 RPC features. Cap'n Proto supports C++, C, Rust, Python, Go, JavaScript, Java, C#, Ruby, Erlang, Nim, D, and Haskell. The KJ C++ toolkit library provides async I/O, event loops, and memory management. As of 2026, it has over 11,700 stars.

Tags & Categories

Categories

Tags

Statistics

1
Views
0
Clicks
0
Like
0
Dislike

Comments

Log In to post a comment

No comments yet. Be the first!