RapidProto documentation
RapidProto compiles a .proto schema into header-only C++ decoders: no runtime library to link and
no third-party dependencies. It is decode-only - no serialization, no reflection - and generates two
models from one schema: an arena decoder that materializes a message tree, and a streaming decoder
that hands each field to a callback. Both validate untrusted wire input and never crash on malformed
bytes. On a mixed real-world payload the arena decoder decodes about 7× as fast as protoc + Arena
(benchmarks).
Start with the quick start; how it got fast walks the optimizations one at a time. The pages below are the topic-by-topic reference.
- arena.md - the arena decoder: accessors, the
Arena,decode_owned, error handling - streaming.md - the streaming decoder: field tags, the consumption patterns, aborting
- dumper.md - the
--dumpdebug dumper: JSON-like inspection text,DumpOptions - semantics.md - the shared rules: lifetimes, validation & trust, presence, open enums, duplicate fields
- using-both-models.md - both models in one TU; coexisting with protoc
- profiles.md - decode profiles (
drop/raw) and unknown-field detection (arena) - integration.md - the
rapidprotocCLI reference and the CMake helper - osm-pbf.md - real-world walkthrough: OSM’s planet format with both models
- optimizations.md - how the decoders got fast: seven optimizations, re-enabled one at a time and measured
- benchmarks.md - the numbers and how to reproduce them
Contributor docs live at the repository root: architecture.md (internals, invariants, design rationale), CONTRIBUTING.md, SECURITY.md, and CHANGELOG.md.