Plugin for protoc protobuf compiler to generate ocaml definitions from a .proto file

Install

Authors

Maintainers

Sources

ocaml-protoc-plugin-4.2.0.tbz
md5=7837774e6637afdbd5e3b1066c01d3b1
sha512=3d96bbdf8a391b8e7903ca07d28507e7568b063521be84f62e9e0e30728ada4cae3553a9239254fb4f2bde480e6cfeb05ec4a2bab699c755a6890108b8f889e6

Description

The plugin generates ocaml type definitions, serialization and deserialization functions from a protobuf file. The types generated aims to create ocaml idiomatic types;

  • messages are mapped into modules
  • oneof constructs are mapped to polymorphic variants
  • enums are mapped to adt's
  • map types are mapped to assoc lists
  • all integer types are mapped to int by default (exact mapping is also possible)
  • all floating point types are mapped to float.
  • packages are mapped to nested modules

Published: 03 Feb 2021

Dependencies (3)

  1. ocaml >= "4.06.0"
  2. dune >= "2.0"
  3. conf-protoc >= "1.0.0"

Dev Dependencies (3)

  1. ppx_deriving with-test
  2. ppx_inline_test with-test
  3. ppx_expect with-test

Used by (1)

  1. caisar-onnx

Conflicts

    None