4 ms·
I'd love to read more on how you implemented this. I hope I don't sound lazy, but can you point me a starting location to read up on it? Maybe it's something I
by OptionOfT 2y ago
I'd love to read more on how you implemented this. I hope I don't sound lazy, but can you point me a starting location to read up on it?
Maybe it's something I can backport to serde.
- shepmaster 2y agoCode-wise, it's not too painful [1], the problem is that you need to enable more features for syn. By default, syn doesn't compile in support for parsing arbitrary types / expressions, which does increase the time / space needed. Since syn is a pretty fundamental crate, I've a feeling that Serde probably doesn't want to turn on this feature for minimal gain, but that's pure speculation on my part. [1]: https://github.com/shepmaster/snafu/blob/1dbba9514e2abfdff015ef8ff895510429d0ebef/snafu-derive/src/parse.rs#L764-L784 https://github.com/shepmaster/snafu/blob/1dbba9514e2abfdff01... [2]: https://github.com/shepmaster/snafu/blob/1dbba9514e2abfdff015ef8ff895510429d0ebef/snafu-derive/Cargo.toml#L22 https://github.com/shepmaster/snafu/blob/1dbba9514e2abfdff01...