[ANN] Ocaml-protoc-plugin 2.0.0

Dear All,

It is my pleasure to announce release of 2.0.0 of ocaml-protoc-plugin.

Highlights for this release

  • Moved to a new name: The main module have been renamed to Ocaml_protoc_plugin (from Protobuf), to avoid conflicts with projects still using ocaml-protoc
  • Messages with only one field are not wrapped in a record by default. This can be controlled by the option singleton_record.
  • Oneof structures with only one field are not wrapped in a Polymorphic variant (controlled by option singleton_record)
  • Added googles well known types

The release is available through opam: opam install ocaml-protoc-plugin.2.0.0,
or from github

Full changelog

  • Add examples
  • (*)Oneofs with only one element should not be a variant type
  • Add test when including proto files which defines the same package
  • Add google well know types (library ocaml-protoc-plugin.google_types).
  • (*)Move module to ocaml-protoc-plugin
  • Optimize deserialization of large nested structures
  • Provide pretty_printers aka deriving_show for Result.error and Field.t
  • Fix stack overflow when deserializing big nested structures
  • (*)Add option to not wrap single field type in records
  • Refactor type emitter to closely follow spec (refactor)

(*) indicates breaking change


Maybe mention what it is in the first paragraph?

Oh, yes, I forgot that. I’ve will update the original post to include a short description.


Oh. I see that I cannot update the post - I guess since its too old, so I’ll add the description here:

Ocaml-protoc-plugin is a plugin to google protobuf compiler to generate ocaml idiomatic types and serialization/deserialization functions from a protobuf specification (.proto) file. The plugin aims to support all aspects of the google protobuf specification and be fully compliant with the wire format.