midiserde
When serde is too much and miniserde is not enough.
midiserde is a companion crate for miniserde that brings serde-like ergonomics — derive macros, field attributes, flatten, value conversion — without serde’s monomorphization cost.
We built it while porting vim_rs, a VMware vSphere SDK with roughly 7,000 serializable types, from serde to miniserde. The results: release build time dropped from 19 minutes to 6, and the binary shrank from 40 MB to 12 MB. midiserde exists so you can make the same move without giving up the attributes you rely on.
What’s here
- Usage Guide — Installation, derive macros, all
#[mini(...)]attributes, built-in adapters, and feature flags. - Building #[flatten]: a Rust ownership puzzle — A deep-dive into the technical challenges of implementing
#[mini(flatten)]for a trait-object serialization framework, including borrow checker battles, benchmark comparisons with serde_json, and the design of theFlattenMap/SerializeMapBuildertraits. - Changelog — Release history.