zio-schema
zio-schema copied to clipboard
Implement Protobuf code generator
Given a protobuf, it should be possible to generate both the Scala data structure, as well as the Schema
corresponding to this data structure.
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)