-
Notifications
You must be signed in to change notification settings - Fork 533
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
serde
support for prost-types
#852
Comments
By the way, I did see there was some desire for this at some point, but figured it might be worth bringing up in a separate issue in case things have changed.
|
Any update on this? I cannot compile it to use Struct. |
Recently, another optional dependency was added, so I feel like an optional dependency for Line 22 in e617832
|
Adds "serde_deserialize", "serde_serialize" and "serde" flags to prost-types. This will allow users to enable serde support to the well known types. closes tokio-rs#852
Adds "serde_deserialize", "serde_serialize" and "serde" flags to prost-types. This will allow users to enable serde support to the well known types. closes tokio-rs#852
Adds "serde_deserialize", "serde_serialize" and "serde" flags to prost-types. This will allow users to enable serde support to the well known types. closes tokio-rs#852
Adds "serde_deserialize", "serde_serialize" and "serde" flags to prost-types. This will allow users to enable serde support to the well known types. closes tokio-rs#852
Adds "serde_deserialize", "serde_serialize" and "serde" flags to prost-types. This will allow users to enable serde support to the well known types. closes tokio-rs#852
Hi!
I'm trying to support
serde
-based serialization on some Protobuf types I have generated usingprost
. I do this conditionally by putting the following in the build script for my crate.This works great until I use any of the well-known types. The problem, of course, is that the well-known types have already been generated and exist in
prost-types
. The workaround is to usecompile_well_known_types()
, like so.The problem now, however, is that the well-known types I generated are no longer compatible with any other crate's well-known types. So, it becomes difficult to do transformations between the types generated across crates.
My workaround is to generate the well-known types with the appropriate
serde
attributes in a new shared crate that can be used by all the other crates in my workspace. But, I was wondering: would it be possible to add a feature flag toprost-types
that would allow one to turn on support forserde
? Or perhaps the feature flag is better situated inprost-build
? I'm not sure exactly where the best place to put it is, but generally having support forserde
would be nice.The text was updated successfully, but these errors were encountered: