/serde-reflect

avoid `Deserialize`/`Serialize` code bloat

Primary LanguageRust

serde-reflect

Have you run cargo bloat and been astounded at the percentage of serde-generated bytes?

Are you haunted by the idea that LLVM needs to chew through a substantial amount of IR?

Do you wish Debug wasn't subject to similar sorts of bloat?

Do you wish you had a runtime representation of the shape of some Rust data?

using serde-reflect

  1. Use #[derive(Reflect)] on the types you want to handle
  2. Construct a database
  3. Register the relevant type information with the database
  4. Call db.deserialize or db.serialize