package ocaml-protoc-plugin

  1. Overview
  2. No Docs
Plugin for protoc protobuf compiler to generate ocaml definitions from a .proto file

Install

dune-project
 Dependency

Authors

Maintainers

Sources

ocaml-protoc-plugin-6.2.0.tbz
sha256=46a87788d39e09d5e824fcab29718f9625787f5b0ffb8fad3bb412567c01ecf6
sha512=bffcbe124320c028cf30b7ff7a69aa214d29eeae9fea0ace4739bcc040fde3d6896a01a075fb6b66832a061d4f3ab185ddbb03235781ddea4a618f9e29626586

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

The package aims to be a 100% compliant protobuf implementation. It also includes serializing to and from json based on protobuf json specification

Published: 17 Sep 2025

Dependencies (9)

  1. ptime
  2. base64 >= "3.1.0"
  3. conf-pkg-config build
  4. omd >= "2.0"
  5. ppx_inline_test
  6. ppx_expect
  7. ocaml >= "4.08.0"
  8. dune >= "3.12"
  9. conf-protoc >= "1.0.0"

Dev Dependencies (7)

  1. yojson with-test
  2. dune-configurator with-test
  3. odoc with-doc
  4. bisect_ppx with-test
  5. ppx_deriving with-test
  6. conf-c++ with-test
  7. conf-protoc-dev with-test

Conflicts

None