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.3.0.tbz
sha256=0c3fdc2b6d46981f9f32477e3e1227dbee1bdb2c6a172f85d30e855c927e6334
sha512=91cf321757377b7f743a6f86aa3e039643558fa46a78d4fc25fc32f829cb33fe43d0766ec8f9606c6e8f1c18886c04bb7d489e6e3f2807e5a6e4136c2053ecdb

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
(**/**)