Add serde feature flag to prost-types - #1252
Open
allada wants to merge 1 commit into
Open
Conversation
allada
force-pushed
the
add-serde-support
branch
4 times, most recently
from
February 27, 2025 21:56
391a5e6 to
67f74b1
Compare
caspermeijn
reviewed
Mar 8, 2025
Comment on lines
+20
to
+21
| serde_serialize = ["std", "dep:serde"] | ||
| serde_deserialize = ["std", "dep:serde"] |
Member
There was a problem hiding this comment.
Why is it important to split the feature? The compiler is smart enough to remove unused code from the binary, right? I suggest having a single serde feature.
| prost = { version = "0.13.5", path = "../prost", default-features = false, features = ["prost-derive"] } | ||
| arbitrary = { version = "1.4", features = ["derive"], optional = true } | ||
| chrono = { version = "0.4.34", default-features = false, optional = true } | ||
| serde = { version = "1.0.218", default-features = false, optional = true, features = ["derive", "std"] } |
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
allada
force-pushed
the
add-serde-support
branch
from
March 17, 2025 17:09
67f74b1 to
ea27b80
Compare
Author
However, it probably is best to stabilize proto-json and it'd likely get serde naturally. This would dramatically reduce the chance of creating a breaking change. |
|
Any update on this? Or any alternatives possible for this? I really need this feature 🙂 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 #852