jamesmunns / postcard

A no_std + serde compatible message library for Rust
Apache License 2.0
943 stars 91 forks source link

Question: how to explore a data dump? #84

Open madig opened 1 year ago

madig commented 1 year ago

Apologies if this is the wrong venue for questions, but:

I recently changed my read-XML-and-dump-postcard code to use quick-xml's serde integration instead of reading XML manually, using the usual serde annotations on my structs here and there instead of FromStr. The postcard dump is now 1MB larger and I don't understand why. Is there some tooling to help me understand where that MB is coming from?

jamesmunns commented 1 year ago

Hey! I don't necessarily have an off-the-shelf tool for you, but it might be worth looking at the two experimental features, which can get you a Schema and MAX_SIZE for a given type. This might aid in your diff.

If that doesn't work, and you can give me a smaller repro case (with types used and before/after data), I can take a look!