# \[ANN\] Ocaml-protoc-plugin 2.0.0

**URL:** <https://discuss.ocaml.org/t/ann-ocaml-protoc-plugin-2-0-0/4582>\
**Category:** Community\
**Tags:** announce\
**Created:** [October 25, 2019, 8:40am UTC](https://discuss.ocaml.org/t/ann-ocaml-protoc-plugin-2-0-0/4582 "2019-10-25T08:40:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fugmann](https://avatars.discourse-cdn.com/v4/letter/f/c68b51/32.png) [@fugmann](https://discuss.ocaml.org/u/fugmann)\
**Post date:** [October 25, 2019, 8:40am UTC](https://discuss.ocaml.org/t/ann-ocaml-protoc-plugin-2-0-0/4582/1 "2019-10-25T08:40:01Z")

</div>

Dear All,

It is my pleasure to announce release of 2.0.0 of [ocaml-protoc-plugin](https://github.com/issuu/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](https://github.com/issuu/ocaml-protoc-plugin/releases/tag/2.0.0)

**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

---

<div class="post-metadata">

**Author:** ![jbulow](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/jbulow/32/644_2.png) [@jbulow](https://discuss.ocaml.org/u/jbulow)\
**Post date:** [October 30, 2019, 9:58am UTC](https://discuss.ocaml.org/t/ann-ocaml-protoc-plugin-2-0-0/4582/2 "2019-10-30T09:58:27Z")

</div>

Maybe mention what it is in the first paragraph?

---

<div class="post-metadata">

**Author:** ![fugmann](https://avatars.discourse-cdn.com/v4/letter/f/c68b51/32.png) [@fugmann](https://discuss.ocaml.org/u/fugmann)\
**Post date:** [October 31, 2019, 2:53pm UTC](https://discuss.ocaml.org/t/ann-ocaml-protoc-plugin-2-0-0/4582/3 "2019-10-31T14:53:16Z")

</div>

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

/Anders

---

<div class="post-metadata">

**Author:** ![fugmann](https://avatars.discourse-cdn.com/v4/letter/f/c68b51/32.png) [@fugmann](https://discuss.ocaml.org/u/fugmann)\
**Post date:** [October 31, 2019, 3:00pm UTC](https://discuss.ocaml.org/t/ann-ocaml-protoc-plugin-2-0-0/4582/4 "2019-10-31T15:00:17Z")

</div>

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**  
[Ocaml-protoc-plugin](https://github.com/issuu/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.
