$ show eyalz800/zpp_bits
zpp_bits is a modern C++20 header-only binary serialization library that provides high-performance, zero-overhead serialization and deserialization of C++ objects. It supports multiple wire formats including a custom compact binary format and an optional protobuf-compatible protocol (zpp::bits::pb) for cross-language interoperability. The library also includes a built-in RPC framework (zpp::bits::rpc) that can generate client/server stubs from function bindings, and compile-time utilities for hashing (SHA-1, SHA-256) and byte manipulation. The architecture is template-heavy, leveraging C++20 concepts, constexpr evaluation, and structured bindings to automatically serialize aggregates without explicit reflection. Error handling is based on std::errc with optional coroutine support via zpp_throwing. The library is self-contained in a single header file (zpp_bits.h) with no external dependencies beyond the C++ standard library, making it easy to integrate into any C++20 project. It is extensively tested with a vendored copy of Google Test and includes CI pipelines for multiple compilers and C++ standards (C++20 through C++26).
The LLM identified 1 files worth highlighting for reuse:
The single header that implements the entire zpp::bits library. It provides core serialization archives (in/out), automatic aggregate member traversal via structured bindings (up to 50 members), protobuf protocol support, RPC client/server generation, varint encoding, endianness control, compile-time hash utilities (SHA-1, SHA-256), and safety guards (allocation limits, nesting depth). The header is self-contained, requires only C++20, and can be dropped into any project with minimal adaptation. It demonstrates advanced template metaprogramming, constexpr evaluation, and protocol design patterns.