Adventures in Serialization: A Flexible Approach for Embedded Systems in C++
summary
Built a C++20 serialization library that actually implements dozens of real legacy encodings — 5-bit integers, 3-byte floats, B64 blobs and packed bitfields — to handle hundreds of message formats used in submarine navigation. It uses an archive/save/load facade, declarative transformers (scale, offset, hex/string, odd-sized ints), and leverages boost pfr and cpp-bits for aggregate reflection; claim is near zero runtime overhead when fully inlined, and the library is in active use.
AI-written summary · about
chapters (18)
- 0:00Introduction
- 1:11Custom data formats in defense
- 2:36Serialization libraries
- 5:27Embedded serialization needs
- 6:56Archive-based architecture
- 9:46Serialization in structs
- 15:29Complex type serialization
- 21:04Iterating struct members
- 29:22Data format transformations
- 36:51Bitfields and odd-sized ints
- 41:08Combining transformations
- 45:52Summary
- 46:54Q&A: Method placement
- 48:44Q&A: Compile-time vs runtime
- 50:48Q&A: Error handling
- 53:20Q&A: Schema versioning
- 54:26Q&A: Libraries and Boost PFR
- 57:01Q&A: Cross-module RPC
related talks
42mSerialization in C++ has never been easier! But wait, there's more
06mA different way to use boost serialization
03mLet's cmakeify the C++ standard library
01h 03m“Lessons Learned From An Embedded RTPS in Modern C++"
01h 02mBinary Object Serialization With Structure Traversal & Reconstruction
01h 16mPolymorphism, Cohesion, and Coupling in C++
01h 31mBetter embedded library interfaces with modern C++
01h 24mOptimising a small real-world C++ application
