7 releases

0.1.13 Sep 13, 2024
0.1.12 Sep 4, 2024
0.1.11 Aug 30, 2024
0.1.10 Jul 22, 2024

#758 in Encoding

Download history 137/week @ 2024-07-22 17/week @ 2024-07-29 8/week @ 2024-08-12 7/week @ 2024-08-19 139/week @ 2024-08-26 146/week @ 2024-09-02 191/week @ 2024-09-09 32/week @ 2024-09-16 51/week @ 2024-09-23 22/week @ 2024-09-30 19/week @ 2024-10-07 18/week @ 2024-10-14 48/week @ 2024-11-04

68 downloads per month
Used in 2 crates (via argus-lib)

MIT license

230KB
6.5K SLoC

Remote serde::Serialize derives for Rustc types

WARNING, these definitions were done hastily, and definitely need a little "fixing up." It will be done at some point. In the meantime, consume at your own risk.

Here is a quick guide to naming conventions used in this module. To Serialize types we try to rely on serde::remote when possible. These remote types by convention append a "Def" suffix to the type.

For example, rustc_middle::ty::Ty is serialized as TyDef.

Serializing rich source information is hard, and requires a step of expansion and processing before all information is had. If you don't believe this claim, take a peek at rustc_middle::ty::print::pretty and come back when you're convinced.

If a type requires expansion into a richer form, this is done inside the new function.

If a type needs to be used within a serde with attribute, then an associated function serialize is defined, and actual serialization will be deferred to the serialize extension method.

If you need to serialize an optional type then prefix it with Option__, and lists of elements are serialized with a prefixed Slice__.

Dependencies

~3.5–6MB
~111K SLoC