zio-schema icon indicating copy to clipboard operation
zio-schema copied to clipboard

Implement Protobuf code generator

Open jdegoes opened this issue 3 years ago • 1 comments

Given a protobuf, it should be possible to generate both the Scala data structure, as well as the Schema corresponding to this data structure.

jdegoes avatar Jun 20 '21 04:06 jdegoes

Thinking about this more, it might lead to a better user experience if, instead of generating a Scala case class, we simply use macros to generate a Schema[A] for an existing Scala data type A, from a probobuf, or fail at compile-time if this is not possible.

e.g.:

implicit val personSchema: Schema[Person] = ProtobufDeriveSchema.gen[Person](protobuf)

jdegoes avatar Jul 08 '21 14:07 jdegoes