A lightweight C++20 header-only library for binary serialization and remote procedure calls with zero-overhead design.
zpp::bits is a C++20 library for binary serialization and remote procedure calls (RPC). It enables efficient conversion of C++ objects to and from binary format with minimal boilerplate, supporting features like compile-time serialization, variant-based versioning, and optional Protocol Buffers compatibility. It solves the need for fast, type-safe data serialization in C++ applications.
C++ developers working on performance-sensitive applications requiring efficient binary serialization, such as game engines, networking stacks, or embedded systems. It's particularly suited for projects leveraging modern C++20 features.
Developers choose zpp::bits for its zero-overhead design, header-only simplicity, and built-in RPC capabilities. It outperforms many alternatives in benchmarks while offering modern C++20 features like constexpr serialization and flexible error handling.
A lightweight C++20 serialization and RPC library
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Serializes trivially copyable types directly with memcpy, leading to minimal runtime overhead as demonstrated in benchmarks outperforming libraries like bitsery and Boost.Serialization.
Leverages constexpr for compile-time serialization and uses std::variant for efficient version control, reducing boilerplate with features like automatic member detection for aggregates.
Supports multiple error handling styles—return values, exceptions, and coroutines via zpp::throwing—as detailed in the README's error handling section for adaptability.
Provides an integrated RPC system for serializing function calls across boundaries, with support for opaque modes and member functions, reducing networking boilerplate.
Requires C++20, which excludes projects on older standards and may complicate integration in environments with limited compiler support.
Does not support serializing null or non-owning pointers, forcing workarounds like zpp::bits::optional_ptr for complex data structures, as admitted in the Limitations section.
Protocol Buffers compatibility is labeled as experimental and 2-5 times slower than the native format, making it unreliable for production cross-language use.