package ocaml-protoc-plugin

  1. Overview
  2. 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

doc/src/ocaml-protoc-plugin/ocaml_protoc_plugin.ml.html

Source file ocaml_protoc_plugin.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
module Json = Json
module Reader = Reader
module Writer = Writer
module Service = Service
module Result = Result
module Extensions = Extensions
module Json_options = Json_options

(**/**)
module Serialize = Serialize
module Deserialize = Deserialize
module Serialize_json = Serialize_json
module Deserialize_json = Deserialize_json
module Spec = Spec
module Field = Field
module Merge = Merge

(** Apply lazy binding if the backed is neither Native or bytecode *)
let[@inline] apply_lazy f =
  match Sys.backend_type with
  | Native | Bytecode ->
    f ()
  | Other _ ->
    let f = Lazy.from_fun f in
    fun x -> (Lazy.force f) x
(**/**)