-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support miniserde/nanoserde? #274
Comments
I don't think we have any notable uses of serde derive features or interesting data structures. I want to avoid writing custom serialization impls, do these others support derives, too? The main issue is where we use things like Utf8Path, which doesn't support other serialization frameworks |
Both miniserde and nanoserde supports derives, although I would personally prefer nanoserde as it has no other dependencies, and miniserde still depends on syn. I think the most useful thing missing though from both is internally tagged enums, which is used for the message types. Those would require a semi-manual implementation, but it's not terribly difficult to implement in the case of nanoserde. Nanoserde also supports remote (called "proxy" there) derives. There's a nice list of supported features on the readme (cargo_metadata obviously only cares about the json column). |
I think we should put serde under a cargo feature. Internally we can use nanoserde, but others may be using serde on our data structures directly and I want to keep supporting that. We can even make serde an optional feature to avoid everyone pulling it in unless they need it |
I'd like to use this crate in a custom cargo xtask style thing, however the use of serde adds a notable compile time cost to a simple crate with no other dependencies, which is inconvenient for something that is essentially a script. It would be nice to add support for a lighter-weight deserialization crate, such as miniserde or nanoserde. Alternatively, it would even be useful to just make serde optional, and custom deserialization impls could be tacked on.
The text was updated successfully, but these errors were encountered: