Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Walkthrough a Serde format in Rust

by Paolo Angioletti, Software Engineering Series, Year 2026

Warning

This book is under development. Some chapters are still incomplete and the content may change without notice.

Welcome! In this book we take a guided tour through the implementation of a Serde data format in Rust. Instead of treating serialization as a black box, we open up a real crate and follow the data from a Rust value, to bytes on the wire, and all the way back again.

The crate we walk through is serde-ubj, a small implementation of Universal Binary JSON (UBJ): a compact, binary cousin of JSON that keeps the same conceptual model while using far fewer bytes.