Description
Feature Request
Crates
tonic_types
Motivation
I'm working with a gRPC API that uses both Well Known Types and Google's RPC types. I've setup the extern paths as such:
.google.protobuf=::pbjson_types
.google.rpc=::tonic_types
I'm trying to use protoc-gen-prost-serde
, but it's failing to generate because some of the protobuf messages embed the Status type which does not implement deserialization. It's throwing this error:
the trait `Deserialize<'_>` is not implemented for `tonic_types::Status`
From what I've discovered, I can add a type attribute of #[derive(serde::Serialize)]
to the types that I'm generating, but because I'm "linking" to the tonic_types library, I don't believe I can modify the Status
type to support serialization without modifying upstream.
Proposal
Have a feature for enabling the dependency on serde in the tonic_types crate.
I'm not a regular Rust programmer these days, so I'm probably not the best source of ideas.
Alternatives
Would be super happy to hear any if I'm missing something!