package ocaml-protoc

  1. Overview
  2. Docs
Pure OCaml compiler for .proto files

Install

Dune Dependency

Authors

Maintainers

Sources

ocaml-protoc-3.0.1.tbz
sha256=33904442e655b259e18386be2ccc335bfaf69e5ecaf02085b6aa327f5c82c365
sha512=d39b027d6b96f14c08789095990abbdad918ae54eba4ab094bef51931ea6f60c89c8e33cd35c0263c7d54e684deeb53c3272985cecb85d83bf546f3a1cd58af0

doc/ocaml-protoc.compiler-lib/Ocaml_protoc_compiler_lib/Pb_option/index.html

Module Ocaml_protoc_compiler_lib.Pb_optionSource

Protobuf File/Message/Field options

Sourcetype constant =
  1. | Constant_string of string
  2. | Constant_bool of bool
  3. | Constant_int of int
  4. | Constant_float of float
  5. | Constant_literal of string

Protobuf constant

As defined in: Protobuf Language Spec.

Sourcetype message_literal = (string * value) list
Sourceand list_literal = value list
Sourceand value =
  1. | Scalar_value of constant
  2. | Message_literal of message_literal
  3. | List_literal of list_literal
Sourcetype option_name = string

Option identifier

Sourcetype set

Collection of options

Can be used for field/message or file options

Sourceval empty : set
Sourceval add : set -> string -> value -> set
Sourceval merge : set -> set -> set

merge s1 s2 adds all the options from s2 to s1. This means than in case of duplicates s2 options will override s1 options.

Sourceval get : set -> string -> value option
Sourceval pp_constant : Format.formatter -> constant -> unit
Sourceval pp_value : Format.formatter -> value -> unit
Sourceval pp_message_literal : Format.formatter -> message_literal -> unit
Sourceval pp_message_field : Format.formatter -> (string * value) -> unit
Sourceval pp_t : Format.formatter -> t -> unit
Sourceval pp_set : Format.formatter -> set -> unit
OCaml

Innovation. Community. Security.