From ab06b64557c109101f9da484bc2f015d9a05f7b7 Mon Sep 17 00:00:00 2001 From: c-cube Date: Wed, 10 Jul 2024 16:01:50 +0000 Subject: [PATCH] deploy: 95777cc33d6691f88002701088a67b89300e6ad5 --- .../Pb_codegen_all/index.html | 9 ---- .../Pb_codegen_backend/Internal/index.html | 10 ----- .../Pb_codegen_backend/index.html | 6 --- .../Pb_codegen_decode_binary/index.html | 2 - .../Pb_codegen_decode_bs/index.html | 2 - .../Pb_codegen_decode_yojson/index.html | 6 --- .../Pb_codegen_default/index.html | 7 --- .../Pb_codegen_encode_binary/index.html | 2 - .../Pb_codegen_encode_bs/index.html | 2 - .../Pb_codegen_encode_yojson/index.html | 2 - .../Pb_codegen_formatting/index.html | 2 - .../Pb_codegen_make/index.html | 2 - .../Pb_codegen_ocaml_type/index.html | 9 ---- .../Pb_codegen_ocaml_type_dump/index.html | 2 - .../Pb_codegen_plugin/index.html | 6 --- .../module-type-S/index.html | 2 - .../Pb_codegen_pp/index.html | 2 - .../Pb_codegen_services/index.html | 8 ---- .../Pb_codegen_types/index.html | 5 --- .../Pb_codegen_util/index.html | 23 ---------- .../Pb_exception/index.html | 24 ---------- .../Pb_field_type/index.html | 25 ----------- .../Pb_format_util/index.html | 7 --- .../Pb_location/index.html | 2 - .../Pb_logger/index.html | 2 - .../Pb_option/index.html | 2 - .../Pb_parsing/index.html | 2 - .../Pb_parsing_lexer/index.html | 17 ------- .../Pb_parsing_parse_tree/index.html | 24 ---------- .../Pb_parsing_parser/index.html | 44 ------------------- .../Pb_parsing_util/index.html | 44 ------------------- .../Pb_typing/index.html | 4 -- .../Pb_typing_graph/index.html | 2 - .../Pb_typing_recursion/index.html | 4 -- .../Types_by_scope/index.html | 6 --- .../Pb_typing_resolution/index.html | 7 --- .../Pb_typing_type_tree/index.html | 2 - .../Pb_typing_util/index.html | 2 - .../Pb_typing_validation/index.html | 8 ---- .../Pb_util/List/index.html | 2 - .../Pb_util/Option/index.html | 2 - .../Pb_util/index.html | 2 - dev/pbrt/Pbrt/Decoder/index.html | 2 - dev/pbrt/Pbrt/Encoder/index.html | 7 --- dev/pbrt/Pbrt/List_util/index.html | 2 - dev/pbrt/Pbrt/Pp/index.html | 18 -------- dev/pbrt/Pbrt/Repeated_field/index.html | 2 - .../Pbrt_services/Client/index.html | 13 ------ .../Pbrt_services/Server/index.html | 11 ----- .../Pbrt_services/Value_mode/index.html | 2 - dev/pbrt_yojson/Pbrt_yojson/E/index.html | 2 - 51 files changed, 402 deletions(-) delete mode 100644 dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_all/index.html delete mode 100644 dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_backend/Internal/index.html delete mode 100644 dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_backend/index.html delete mode 100644 dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_decode_binary/index.html delete mode 100644 dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_decode_bs/index.html delete mode 100644 dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_decode_yojson/index.html delete mode 100644 dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_default/index.html delete mode 100644 dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_encode_binary/index.html delete mode 100644 dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_encode_bs/index.html delete mode 100644 dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_encode_yojson/index.html delete mode 100644 dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_formatting/index.html delete mode 100644 dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_make/index.html delete mode 100644 dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_ocaml_type/index.html delete mode 100644 dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_ocaml_type_dump/index.html delete mode 100644 dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_plugin/index.html delete mode 100644 dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_plugin/module-type-S/index.html delete mode 100644 dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_pp/index.html delete mode 100644 dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_services/index.html delete mode 100644 dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_types/index.html delete mode 100644 dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_util/index.html delete mode 100644 dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_exception/index.html delete mode 100644 dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_field_type/index.html delete mode 100644 dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_format_util/index.html delete mode 100644 dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_location/index.html delete mode 100644 dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_logger/index.html delete mode 100644 dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_option/index.html delete mode 100644 dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_parsing/index.html delete mode 100644 dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_parsing_lexer/index.html delete mode 100644 dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_parsing_parse_tree/index.html delete mode 100644 dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_parsing_parser/index.html delete mode 100644 dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_parsing_util/index.html delete mode 100644 dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_typing/index.html delete mode 100644 dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_typing_graph/index.html delete mode 100644 dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_typing_recursion/index.html delete mode 100644 dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_typing_resolution/Types_by_scope/index.html delete mode 100644 dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_typing_resolution/index.html delete mode 100644 dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_typing_type_tree/index.html delete mode 100644 dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_typing_util/index.html delete mode 100644 dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_typing_validation/index.html delete mode 100644 dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_util/List/index.html delete mode 100644 dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_util/Option/index.html delete mode 100644 dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_util/index.html delete mode 100644 dev/pbrt/Pbrt/Decoder/index.html delete mode 100644 dev/pbrt/Pbrt/Encoder/index.html delete mode 100644 dev/pbrt/Pbrt/List_util/index.html delete mode 100644 dev/pbrt/Pbrt/Pp/index.html delete mode 100644 dev/pbrt/Pbrt/Repeated_field/index.html delete mode 100644 dev/pbrt_services/Pbrt_services/Client/index.html delete mode 100644 dev/pbrt_services/Pbrt_services/Server/index.html delete mode 100644 dev/pbrt_services/Pbrt_services/Value_mode/index.html delete mode 100644 dev/pbrt_yojson/Pbrt_yojson/E/index.html diff --git a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_all/index.html b/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_all/index.html deleted file mode 100644 index 2c8840a1..00000000 --- a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_all/index.html +++ /dev/null @@ -1,9 +0,0 @@ - -Pb_codegen_all (ocaml-protoc.Ocaml_protoc_compiler_lib.Pb_codegen_all)

Module Ocaml_protoc_compiler_lib.Pb_codegen_all

Generate all the code for a given OCaml module.

module Plugin = Pb_codegen_plugin
type ocaml_mod = {
  1. ml : F.scope;
  2. mli : F.scope;
}
val codegen : - Ot.proto -> - generate_make:bool -> - proto_file_options:Pb_option.set -> - proto_file_name:string -> - services:bool -> - Plugin.t list -> - ocaml_mod

codegen types returns a full code listing for the .ml and the .mli files.

diff --git a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_backend/Internal/index.html b/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_backend/Internal/index.html deleted file mode 100644 index 1bdc1b46..00000000 --- a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_backend/Internal/index.html +++ /dev/null @@ -1,10 +0,0 @@ - -Internal (ocaml-protoc.Ocaml_protoc_compiler_lib.Pb_codegen_backend.Internal)

Module Pb_codegen_backend.Internal

Internal helpers.

For now there are no guarantees of stability within this module. It's unlikely that the signatures will change, but the possibility is still there.

val is_mutable : ?field_name:string -> Pb_option.set -> bool
val constructor_name : string -> string
val module_name : string -> string
val label_name_of_field_name : string -> string
val type_name : string list -> string -> string
val variant_of_oneof : - ?include_oneof_name:unit -> - outer_message_names:string list -> - unsigned_tag:bool -> - all_types:'a Tt.proto_type list -> - Pb_option.set -> - string -> - int Tt.oneof -> - Ot.variant
diff --git a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_backend/index.html b/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_backend/index.html deleted file mode 100644 index 8515eed8..00000000 --- a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_backend/index.html +++ /dev/null @@ -1,6 +0,0 @@ - -Pb_codegen_backend (ocaml-protoc.Ocaml_protoc_compiler_lib.Pb_codegen_backend)

Module Ocaml_protoc_compiler_lib.Pb_codegen_backend

Compile protobuf typed tree to the OCaml AST.

This module focuses on the compilation steps which transforms a fully resolved Protobuf message into an OCaml representation.

After compilation this module also expose code generation functionality.

Compilation

val compile : - unsigned_tag:bool -> - all_types:Pb_field_type.resolved Tt.proto_type list -> - Pb_field_type.resolved Tt.proto -> - Ot.proto
module Internal : sig ... end

Internal helpers.

diff --git a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_decode_binary/index.html b/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_decode_binary/index.html deleted file mode 100644 index e21e63bd..00000000 --- a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_decode_binary/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Pb_codegen_decode_binary (ocaml-protoc.Ocaml_protoc_compiler_lib.Pb_codegen_decode_binary)

Module Ocaml_protoc_compiler_lib.Pb_codegen_decode_binary

Code generator for the decode function

include Pb_codegen_plugin.S

Generate a signature file (.mli)

Generate the implementation (.ml)

val ocamldoc_title : string

OCamldoc title

val requires_mutable_records : bool

Does this record depend on mutable records being defined?

val plugin : Pb_codegen_plugin.t
diff --git a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_decode_bs/index.html b/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_decode_bs/index.html deleted file mode 100644 index 1d735902..00000000 --- a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_decode_bs/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Pb_codegen_decode_bs (ocaml-protoc.Ocaml_protoc_compiler_lib.Pb_codegen_decode_bs)

Module Ocaml_protoc_compiler_lib.Pb_codegen_decode_bs

include Pb_codegen_plugin.S

Generate a signature file (.mli)

Generate the implementation (.ml)

val ocamldoc_title : string

OCamldoc title

val requires_mutable_records : bool

Does this record depend on mutable records being defined?

val plugin : Pb_codegen_plugin.t
diff --git a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_decode_yojson/index.html b/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_decode_yojson/index.html deleted file mode 100644 index ccfa09db..00000000 --- a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_decode_yojson/index.html +++ /dev/null @@ -1,6 +0,0 @@ - -Pb_codegen_decode_yojson (ocaml-protoc.Ocaml_protoc_compiler_lib.Pb_codegen_decode_yojson)

Module Ocaml_protoc_compiler_lib.Pb_codegen_decode_yojson

Code generator for the decode JSON function

include Pb_codegen_plugin.S

Generate a signature file (.mli)

Generate the implementation (.ml)

val ocamldoc_title : string

OCamldoc title

val requires_mutable_records : bool

Does this record depend on mutable records being defined?

val field_pattern_match : - r_name:string -> - rf_label:string -> - Pb_codegen_ocaml_type.field_type -> - string * string

How to decode a field type

val plugin : Pb_codegen_plugin.t
diff --git a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_default/index.html b/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_default/index.html deleted file mode 100644 index dc250391..00000000 --- a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_default/index.html +++ /dev/null @@ -1,7 +0,0 @@ - -Pb_codegen_default (ocaml-protoc.Ocaml_protoc_compiler_lib.Pb_codegen_default)

Module Ocaml_protoc_compiler_lib.Pb_codegen_default

Code generator for the default functions (i.e builders)

include Pb_codegen_plugin.S

Generate a signature file (.mli)

Generate the implementation (.ml)

val ocamldoc_title : string

OCamldoc title

val requires_mutable_records : bool

Does this record depend on mutable records being defined?

val record_field_default_info : - Pb_codegen_ocaml_type.record_field -> - string * string * string

This function returns (field_name, field_default_value, field_type) for a record field.

val gen_record_mutable : - Pb_codegen_ocaml_type.record -> - Pb_codegen_formatting.scope -> - unit
diff --git a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_encode_binary/index.html b/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_encode_binary/index.html deleted file mode 100644 index a0049088..00000000 --- a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_encode_binary/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Pb_codegen_encode_binary (ocaml-protoc.Ocaml_protoc_compiler_lib.Pb_codegen_encode_binary)

Module Ocaml_protoc_compiler_lib.Pb_codegen_encode_binary

Code generator for the encode function

include Pb_codegen_plugin.S

Generate a signature file (.mli)

Generate the implementation (.ml)

val ocamldoc_title : string

OCamldoc title

val requires_mutable_records : bool

Does this record depend on mutable records being defined?

val plugin : Pb_codegen_plugin.t
diff --git a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_encode_bs/index.html b/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_encode_bs/index.html deleted file mode 100644 index 59ad6948..00000000 --- a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_encode_bs/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Pb_codegen_encode_bs (ocaml-protoc.Ocaml_protoc_compiler_lib.Pb_codegen_encode_bs)

Module Ocaml_protoc_compiler_lib.Pb_codegen_encode_bs

include Pb_codegen_plugin.S

Generate a signature file (.mli)

Generate the implementation (.ml)

val ocamldoc_title : string

OCamldoc title

val requires_mutable_records : bool

Does this record depend on mutable records being defined?

val plugin : Pb_codegen_plugin.t
diff --git a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_encode_yojson/index.html b/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_encode_yojson/index.html deleted file mode 100644 index 7363d03f..00000000 --- a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_encode_yojson/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Pb_codegen_encode_yojson (ocaml-protoc.Ocaml_protoc_compiler_lib.Pb_codegen_encode_yojson)

Module Ocaml_protoc_compiler_lib.Pb_codegen_encode_yojson

Code generator for the encode JSON function

include Pb_codegen_plugin.S

Generate a signature file (.mli)

Generate the implementation (.ml)

val ocamldoc_title : string

OCamldoc title

val requires_mutable_records : bool

Does this record depend on mutable records being defined?

val plugin : Pb_codegen_plugin.t
diff --git a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_formatting/index.html b/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_formatting/index.html deleted file mode 100644 index 8e4d4fab..00000000 --- a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_formatting/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Pb_codegen_formatting (ocaml-protoc.Ocaml_protoc_compiler_lib.Pb_codegen_formatting)

Module Ocaml_protoc_compiler_lib.Pb_codegen_formatting

Formatting utilities for code generation

types

type scope

A scope is a formatting container which can contains line of text as well as other nested scopes

In other word a scope define an indentation section.

Creation

val empty_scope : unit -> scope

empty_scope () returns a brand new scope

val line : scope -> string -> unit

line scope s adds s to scope

val linep : scope -> ('a, unit, string, unit) Stdlib.format4 -> 'a
val empty_line : scope -> unit

empty_line scope adds an empty line to scope

val sub_scope : scope -> (scope -> unit) -> unit

sub_scope scope f adds a sub scope and apply f to it.

Printing

val to_string : scope -> string

print scope returns the formatted scops with a 2 character indentation for each scope.

val output : Stdlib.out_channel -> scope -> unit

Write to output

diff --git a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_make/index.html b/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_make/index.html deleted file mode 100644 index cb69a437..00000000 --- a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_make/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Pb_codegen_make (ocaml-protoc.Ocaml_protoc_compiler_lib.Pb_codegen_make)

Module Ocaml_protoc_compiler_lib.Pb_codegen_make

Code generator for the make functions (i.e builders, but stricter than default)

include Pb_codegen_plugin.S

Generate a signature file (.mli)

Generate the implementation (.ml)

val ocamldoc_title : string

OCamldoc title

val requires_mutable_records : bool

Does this record depend on mutable records being defined?

diff --git a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_ocaml_type/index.html b/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_ocaml_type/index.html deleted file mode 100644 index 59d58795..00000000 --- a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_ocaml_type/index.html +++ /dev/null @@ -1,9 +0,0 @@ - -Pb_codegen_ocaml_type (ocaml-protoc.Ocaml_protoc_compiler_lib.Pb_codegen_ocaml_type)

Module Ocaml_protoc_compiler_lib.Pb_codegen_ocaml_type

OCaml type representation

type payload_kind =
  1. | Pk_varint of bool
    (*

    zigzag

    *)
  2. | Pk_bits32
  3. | Pk_bits64
  4. | Pk_bytes
type user_defined_type = {
  1. udt_module_prefix : string option;
    (*

    since code generated is split in multiple file (type, binary, json, ..) this defines the prefix for the given type, the suffix will be defined by each generator

    *)
  2. udt_type_name : string;
    (*

    OCaml type name ie not the type name in proto file

    *)
  3. udt_type : [ `Message | `Enum ];
    (*

    Need to keep track of this since encoding logic in binary format is quite different

    *)
}
type basic_type =
  1. | Bt_string
  2. | Bt_float
  3. | Bt_int
  4. | Bt_int32
  5. | Bt_uint32
  6. | Bt_int64
  7. | Bt_uint64
  8. | Bt_bytes
  9. | Bt_bool
type wrapper_type = {
  1. wt_type : basic_type;
  2. wt_pk : payload_kind;
}
type field_type =
  1. | Ft_unit
  2. | Ft_basic_type of basic_type
  3. | Ft_user_defined_type of user_defined_type
  4. | Ft_wrapper_type of wrapper_type
    (*

    New wrapper type which indicates that the corresponding ocaml Type should be an `option` along with the fact that it is encoded with special rules

    *)
type default_value = Pb_option.constant option
type associative_type =
  1. | At_list
  2. | At_hashtable
type repeated_type =
  1. | Rt_list
  2. | Rt_repeated_field
type encoding_number = int
type is_packed = bool
type record_field_type =
  1. | Rft_nolabel of field_type * encoding_number * payload_kind
    (*

    no default values in proto3 no label fields

    *)
  2. | Rft_required of field_type * encoding_number * payload_kind * default_value
  3. | Rft_optional of field_type * encoding_number * payload_kind * default_value
  4. | Rft_repeated of repeated_type - * field_type - * encoding_number - * payload_kind - * is_packed
  5. | Rft_associative of associative_type - * encoding_number - * (basic_type * payload_kind) - * (field_type * payload_kind)
  6. | Rft_variant of variant
and variant_constructor = {
  1. vc_constructor : string;
  2. vc_field_type : variant_constructor_type;
  3. vc_encoding_number : encoding_number;
  4. vc_payload_kind : payload_kind;
  5. vc_options : Pb_option.set;
}
and variant_constructor_type =
  1. | Vct_nullary
  2. | Vct_non_nullary_constructor of field_type
and variant = {
  1. v_name : string;
  2. v_constructors : variant_constructor list;
}
and record_field = {
  1. rf_label : string;
  2. rf_field_type : record_field_type;
  3. rf_mutable : bool;
  4. rf_options : Pb_option.set;
}
and record = {
  1. r_name : string;
  2. r_fields : record_field list;
}
and const_variant_constructor = {
  1. cvc_name : string;
  2. cvc_binary_value : int;
  3. cvc_string_value : string;
  4. cvc_options : Pb_option.set;
}
and const_variant = {
  1. cv_name : string;
  2. cv_constructors : const_variant_constructor list;
}
and empty_record = {
  1. er_name : string;
}
and type_spec =
  1. | Record of record
  2. | Variant of variant
  3. | Const_variant of const_variant
  4. | Unit of empty_record
type type_ = {
  1. module_prefix : string;
    (*

    code generation leads to several file/module being generated for a given type_. module_prefix is the common prefix for all those generated module and it is based on the `.proto` filename.

    *)
  2. spec : type_spec;
  3. type_level_ppx_extension : string option;
  4. type_options : Pb_option.set;
}
type rpc_type =
  1. | Rpc_scalar of field_type
  2. | Rpc_stream of field_type

RPC argument or return type. We require message types in RPC.

type rpc = {
  1. rpc_name : string;
  2. rpc_req : rpc_type;
  3. rpc_res : rpc_type;
}

A RPC specification, ie the signature for one remote procedure.

type service = {
  1. service_name : string;
  2. service_packages : string list;
    (*

    Package in which this belongs

    *)
  3. service_body : rpc list;
}

A service, composed of multiple RPCs.

type proto = {
  1. proto_types : type_ list list;
    (*

    List of strongly connected type definitions

    *)
  2. proto_services : service list;
}

A proto file is composed of a list of types and a list of services.

diff --git a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_ocaml_type_dump/index.html b/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_ocaml_type_dump/index.html deleted file mode 100644 index a48f4a26..00000000 --- a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_ocaml_type_dump/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Pb_codegen_ocaml_type_dump (ocaml-protoc.Ocaml_protoc_compiler_lib.Pb_codegen_ocaml_type_dump)

Module Ocaml_protoc_compiler_lib.Pb_codegen_ocaml_type_dump

Plugin that dumps a representation of the parsed proto in comments

include Pb_codegen_plugin.S

Generate a signature file (.mli)

Generate the implementation (.ml)

val ocamldoc_title : string

OCamldoc title

val requires_mutable_records : bool

Does this record depend on mutable records being defined?

val plugin : Pb_codegen_plugin.t
diff --git a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_plugin/index.html b/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_plugin/index.html deleted file mode 100644 index 2f8febe5..00000000 --- a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_plugin/index.html +++ /dev/null @@ -1,6 +0,0 @@ - -Pb_codegen_plugin (ocaml-protoc.Ocaml_protoc_compiler_lib.Pb_codegen_plugin)

Module Ocaml_protoc_compiler_lib.Pb_codegen_plugin

Plugin architecture.

OCaml-protoc generates code based on a number of plugins, each of which can contribute code to the output files (.ml and .mli).

type codegen_f = - ?and_:unit -> - Pb_codegen_ocaml_type.type_ -> - Pb_codegen_formatting.scope -> - bool

A code generation function

module type S = sig ... end
type t = (module S)

A plugin is a code-generator respecting the signature S.

val requires_mutable_records : (module S) -> bool
diff --git a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_plugin/module-type-S/index.html b/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_plugin/module-type-S/index.html deleted file mode 100644 index 2a59ca88..00000000 --- a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_plugin/module-type-S/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -S (ocaml-protoc.Ocaml_protoc_compiler_lib.Pb_codegen_plugin.S)

Module type Pb_codegen_plugin.S

val gen_sig : codegen_f

Generate a signature file (.mli)

val gen_struct : codegen_f

Generate the implementation (.ml)

val ocamldoc_title : string

OCamldoc title

val requires_mutable_records : bool

Does this record depend on mutable records being defined?

diff --git a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_pp/index.html b/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_pp/index.html deleted file mode 100644 index 12ec94e0..00000000 --- a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_pp/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Pb_codegen_pp (ocaml-protoc.Ocaml_protoc_compiler_lib.Pb_codegen_pp)

Module Ocaml_protoc_compiler_lib.Pb_codegen_pp

Code generator for the pp function

include Pb_codegen_plugin.S

Generate a signature file (.mli)

Generate the implementation (.ml)

val ocamldoc_title : string

OCamldoc title

val requires_mutable_records : bool

Does this record depend on mutable records being defined?

val plugin : Pb_codegen_plugin.t
diff --git a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_services/index.html b/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_services/index.html deleted file mode 100644 index 50b94d72..00000000 --- a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_services/index.html +++ /dev/null @@ -1,8 +0,0 @@ - -Pb_codegen_services (ocaml-protoc.Ocaml_protoc_compiler_lib.Pb_codegen_services)

Module Ocaml_protoc_compiler_lib.Pb_codegen_services

val gen_service_sig : - Pb_codegen_ocaml_type.service -> - Pb_codegen_formatting.scope -> - unit
val gen_service_struct : - Pb_codegen_ocaml_type.service -> - Pb_codegen_formatting.scope -> - unit
diff --git a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_types/index.html b/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_types/index.html deleted file mode 100644 index eaaa7bfe..00000000 --- a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_types/index.html +++ /dev/null @@ -1,5 +0,0 @@ - -Pb_codegen_types (ocaml-protoc.Ocaml_protoc_compiler_lib.Pb_codegen_types)

Module Ocaml_protoc_compiler_lib.Pb_codegen_types

Code generator for the OCaml types

include Pb_codegen_plugin.S

Generate a signature file (.mli)

Generate the implementation (.ml)

val ocamldoc_title : string

OCamldoc title

val requires_mutable_records : bool

Does this record depend on mutable records being defined?

val gen_record_mutable : - Pb_codegen_ocaml_type.record -> - Pb_codegen_formatting.scope -> - unit
diff --git a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_util/index.html b/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_util/index.html deleted file mode 100644 index 9cb6c091..00000000 --- a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_codegen_util/index.html +++ /dev/null @@ -1,23 +0,0 @@ - -Pb_codegen_util (ocaml-protoc.Ocaml_protoc_compiler_lib.Pb_codegen_util)

Module Ocaml_protoc_compiler_lib.Pb_codegen_util

Common utility functions for OCaml code generation

val sp : ('a, unit, string) Stdlib.format -> 'a

sp x same as sprintf but prefixed with new line

val let_decl_of_and : 'a option -> string

let_decl_of_and and_ returns the function declaration "let" (when ?and_ is None), "and" otherwise.

val string_of_record_field_type : - ?module_prefix:string -> - Pb_codegen_ocaml_type.record_field_type -> - string
val string_of_basic_type : - ?for_pp:bool -> - Pb_codegen_ocaml_type.basic_type -> - string
val string_of_field_type : - ?for_pp:bool -> - ?module_prefix:string -> - Pb_codegen_ocaml_type.field_type -> - string
val function_name_of_user_defined : - function_prefix:string -> - Pb_codegen_ocaml_type.user_defined_type -> - string

function_name_of_user_defined prefix user_defined returns the function name of the form `(module'.'?)<prefix>_(type_name)`.

This pattern is common since a generated function for a type (encode/decode/to_string) will call the same generated function for each user defined field type.

val module_type_name_of_service_client : - Pb_codegen_ocaml_type.service -> - string

Name of the module type for this service (client)

val module_type_name_of_service_server : - Pb_codegen_ocaml_type.service -> - string

Name of the module type for this service (server)

val function_name_of_rpc : Pb_codegen_ocaml_type.rpc -> string

Name of the function for this RPC

val caml_file_name_of_proto_file_name : proto_file_name:string -> string

caml_file_name_of_proto_file_name filename returns the OCaml file name from the protobuf file name

val mutable_record_name : string -> string

mutable_record_name record_name returns the type name of the `mutable` type name. We use mutable types when decoding for better performance, this function encapsulate the nameing convention for this additional type.

val string_of_payload_kind : - ?capitalize:unit -> - Pb_codegen_ocaml_type.payload_kind -> - bool -> - string

string_of_payload_kind ~capitalize:() payload_kind packed will return the string corresponding to the payload kind.

val camel_case_of_label : string -> string

this function transforms a `lower_case_like_this` into an camlCaseLikeThis

val camel_case_of_constructor : string -> string

this function transform an OCaml constructuror `Like_this` into a 'likeThis' case

val collect_modules_of_types : Pb_codegen_ocaml_type.type_ list -> string list

collect_modules_of_types ocaml_types return the list of all the modules that the ocaml_types depends on

diff --git a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_exception/index.html b/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_exception/index.html deleted file mode 100644 index b3ed0009..00000000 --- a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_exception/index.html +++ /dev/null @@ -1,24 +0,0 @@ - -Pb_exception (ocaml-protoc.Ocaml_protoc_compiler_lib.Pb_exception)

Module Ocaml_protoc_compiler_lib.Pb_exception

Compiler exception

Types

type programmatic_error =
  1. | Invalid_string_split
  2. | No_type_found_for_id
type error
exception Compilation_error of error

Exception raised when a compilation error occurs

Raise Functions

val unresolved_type : - field_name:string -> - type_:string -> - message_name:string -> - unit -> - 'a
val duplicated_field_number : - field_name:string -> - previous_field_name:string -> - message_name:string -> - unit -> - 'a
val invalid_default_value : ?field_name:string -> info:string -> unit -> 'a
val unsupported_field_type : - ?field_name:string -> - field_type:string -> - backend_name:string -> - unit -> - 'a
val import_file_not_found : string -> 'a
val programmatic_error : programmatic_error -> 'a
val invalid_import_qualifier : Pb_location.t -> 'a
val invalid_file_name : string -> 'a
val invalid_packed_option : string -> 'a
val missing_semicolon_for_enum_value : string -> Pb_location.t -> 'a
val invalid_enum_specification : string -> Pb_location.t -> 'a
val invalid_mutable_option : ?field_name:string -> unit -> 'a
val missing_one_of_name : Pb_location.t -> 'a
val missing_field_label : field_name:string -> message_name:string -> 'a
val invalid_ppx_extension_option : string -> 'a
val ocamlyacc_parsing_error : Pb_location.t -> string -> 'a
val protoc_parsing_error : error -> Pb_location.t -> string -> 'a
val unknown_parsing_error : msg:string -> context:string -> Pb_location.t -> 'a
val invalid_protobuf_syntax : string -> 'a
val invalid_proto3_field_label : field_name:string -> message_name:string -> 'a
val invalid_rpc_req_type : service_name:string -> rpc_name:string -> unit -> 'a
val invalid_rpc_res_type : service_name:string -> rpc_name:string -> unit -> 'a
val default_field_option_not_supported : - field_name:string -> - message_name:string -> - 'a
val invalid_first_enum_value_proto3 : - ?message_name:string -> - enum_name:string -> - unit -> - 'a
val invalid_key_type_for_map : string -> 'a
val unsupported_wrapper_type : string -> 'a
diff --git a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_field_type/index.html b/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_field_type/index.html deleted file mode 100644 index ec45a4b0..00000000 --- a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_field_type/index.html +++ /dev/null @@ -1,25 +0,0 @@ - -Pb_field_type (ocaml-protoc.Ocaml_protoc_compiler_lib.Pb_field_type)

Module Ocaml_protoc_compiler_lib.Pb_field_type

Protobuffer Field type

type type_path = string list

Scope path of a type used for a message field.

For instance in the following field definition: required foo.bar.Msg1 f = 1

The type_path would be ["foo"; "bar"]

type unresolved = {
  1. type_path : type_path;
  2. type_name : string;
  3. from_root : bool;
    (*

    from_root indicates that the scope for the type is from the root of the type system. (ie starts with '.')

    *)
}

In the first phase of the compilation the field of message type are not resolved but only properly parsed.

The following type summarizes the information of a field type.

In the following field definition: required foo.bar.Msg1 f = 1

The unresolved type would be: { - scope=["foo";"bar"]; - type_name="Msg1"; - from_root = false - }

type resolved = int

After phase 2 compilation the field type is resolved to a known message which can be uniquely identified by its id.

type builtin_type_floating_point = [
  1. | `Double
  2. | `Float
]

Floating point builtin types

type builtin_type_unsigned_int = [
  1. | `Uint32
  2. | `Uint64
]

Unsigned integer builtin types

type builtin_type_signed_int = [
  1. | `Int32
  2. | `Int64
  3. | `Sint32
  4. | `Sint64
  5. | `Fixed32
  6. | `Fixed64
  7. | `Sfixed32
  8. | `Sfixed64
]

Signed integer builtin types

type builtin_type_int = [
  1. | builtin_type_unsigned_int
  2. | builtin_type_signed_int
]

Integer builtin types

type map_key_type = [
  1. | builtin_type_int
  2. | `Bool
  3. | `String
]
type builtin_type = [
  1. | builtin_type_floating_point
  2. | builtin_type_int
  3. | `Bool
  4. | `String
  5. | `Bytes
]

Builtin type defined in protobuf

type 'a t = [
  1. | builtin_type
  2. | `User_defined of 'a
]

field type.

The 'a type is for re-using the same type definition for the 2 compilation phases.

After Phase 1 'a is unresolved while after Phase2 'a is resolved.

type unresolved_t = unresolved t
type resolved_t = resolved t
val parse : string -> unresolved_t
val pp_type_path : Stdlib.Format.formatter -> type_path -> unit
val pp_builtin_type_floating_point : - Stdlib.Format.formatter -> - builtin_type_floating_point -> - unit
val pp_builtin_type_unsigned_int : - Stdlib.Format.formatter -> - builtin_type_unsigned_int -> - unit
val pp_builtin_type_signed_int : - Stdlib.Format.formatter -> - builtin_type_signed_int -> - unit
val pp_builtin_type_int : Stdlib.Format.formatter -> builtin_type_int -> unit
val pp_map_key_type : Stdlib.Format.formatter -> map_key_type -> unit
val pp_builtin_type : Stdlib.Format.formatter -> builtin_type -> unit
val pp_unresolved : Stdlib.Format.formatter -> unresolved -> unit
val pp_resolved : Stdlib.Format.formatter -> resolved -> unit
val pp_type : - (Stdlib.Format.formatter -> 'a -> unit) -> - Stdlib.Format.formatter -> - [ builtin_type | `User_defined of 'a ] -> - unit
val pp_unresolved_t : - Stdlib.Format.formatter -> - [ builtin_type | `User_defined of unresolved ] -> - unit
val pp_resolved_t : - Stdlib.Format.formatter -> - [ builtin_type | `User_defined of resolved ] -> - unit
diff --git a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_format_util/index.html b/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_format_util/index.html deleted file mode 100644 index 03c0b2b8..00000000 --- a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_format_util/index.html +++ /dev/null @@ -1,7 +0,0 @@ - -Pb_format_util (ocaml-protoc.Ocaml_protoc_compiler_lib.Pb_format_util)

Module Ocaml_protoc_compiler_lib.Pb_format_util

val pp_print_option : - ?none:('a -> unit -> unit) -> - ('a -> 'b -> unit) -> - 'a -> - 'b option -> - unit
val pp_none : Stdlib.Format.formatter -> unit -> unit
diff --git a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_location/index.html b/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_location/index.html deleted file mode 100644 index 7eecae06..00000000 --- a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_location/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Pb_location (ocaml-protoc.Ocaml_protoc_compiler_lib.Pb_location)

Module Ocaml_protoc_compiler_lib.Pb_location

File location utilities

type t

Location type

Creators

val from_lexbuf : Stdlib.Lexing.lexbuf -> t

from_lexbuf lexbuf create a location from the current lexbuf location

Accessors

Utilities

val to_string : t -> string

to_string loc convert to the compiler error string

diff --git a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_logger/index.html b/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_logger/index.html deleted file mode 100644 index 52153221..00000000 --- a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_logger/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Pb_logger (ocaml-protoc.Ocaml_protoc_compiler_lib.Pb_logger)

Module Ocaml_protoc_compiler_lib.Pb_logger

Logging functionality allow printing debugging information

val setup_from_out_channel : Stdlib.out_channel -> unit

setup_from_out_channel oc will configure the logger to print all logging statement to oc.

Function can be called multiple times, each call will disable (override) the previously setup out channel

val log : ('a, Stdlib.out_channel, unit) Stdlib.format -> 'a

log format x y same as Printf.printf except that the message will get printed to the previously setup out_channel in the setup_from_out_channel function.

val endline : string -> unit

endline str same as Stdlib.print_endline str except that the message will get printed to the previously setup out_channel in the setup_from_out_channel function.

diff --git a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_option/index.html b/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_option/index.html deleted file mode 100644 index 0830b280..00000000 --- a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_option/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Pb_option (ocaml-protoc.Ocaml_protoc_compiler_lib.Pb_option)

Module Ocaml_protoc_compiler_lib.Pb_option

Protobuf File/Message/Field options

type 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.

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

Option identifier

type t = option_name * value
type set = t list

Collection of options

Can be used for field/message or file options

val empty : set
val add : set -> string -> value -> set
val 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.

val get : set -> string -> value option
val pp_constant : Stdlib.Format.formatter -> constant -> unit
val pp_value : Stdlib.Format.formatter -> value -> unit
val pp_message_literal : Stdlib.Format.formatter -> message_literal -> unit
val pp_message_field : Stdlib.Format.formatter -> (string * value) -> unit
val pp_t : Stdlib.Format.formatter -> t -> unit
val pp_set : Stdlib.Format.formatter -> set -> unit
diff --git a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_parsing/index.html b/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_parsing/index.html deleted file mode 100644 index db0ad605..00000000 --- a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_parsing/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Pb_parsing (ocaml-protoc.Ocaml_protoc_compiler_lib.Pb_parsing)

Module Ocaml_protoc_compiler_lib.Pb_parsing

Parsing compilation step

This module perform the parsing of the given protobuf file along with all the imported files.

type file_loader = string -> string * string

Given a file name return the fully qualified file name along with its content

val parse_file : file_loader -> string -> Pb_parsing_parse_tree.proto list

parse_file file_loader file_name reutrns the protobuf parse tree of the given file_name and all its dependent files (ie imports).

diff --git a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_parsing_lexer/index.html b/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_parsing_lexer/index.html deleted file mode 100644 index 891c8ab8..00000000 --- a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_parsing_lexer/index.html +++ /dev/null @@ -1,17 +0,0 @@ - -Pb_parsing_lexer (ocaml-protoc.Ocaml_protoc_compiler_lib.Pb_parsing_lexer)

Module Ocaml_protoc_compiler_lib.Pb_parsing_lexer

module Loc = Pb_location
val resolve_identifier : Pb_location.t -> string -> Pb_parsing_parser.token
type comment =
  1. | Comment_value of string
  2. | Comment_eof
val comment_value : string -> comment
val comment_eof : comment
type string_ =
  1. | String_value of string
  2. | String_eof
val string_value : string -> string_
val string_eof : string_
val update_loc : Stdlib.Lexing.lexbuf -> unit
val __ocaml_lex_tables : Stdlib.Lexing.lex_tables
val lexer : Stdlib.Lexing.lexbuf -> Pb_parsing_parser.token
val __ocaml_lex_lexer_rec : - Stdlib.Lexing.lexbuf -> - int -> - Pb_parsing_parser.token
val comment : string list -> Stdlib.Lexing.lexbuf -> comment
val __ocaml_lex_comment_rec : - string list -> - Stdlib.Lexing.lexbuf -> - int -> - comment
val multi_line_comment : string list -> Stdlib.Lexing.lexbuf -> comment
val __ocaml_lex_multi_line_comment_rec : - string list -> - Stdlib.Lexing.lexbuf -> - int -> - comment
val string : string list -> Stdlib.Lexing.lexbuf -> string_
val __ocaml_lex_string_rec : - string list -> - Stdlib.Lexing.lexbuf -> - int -> - string_
diff --git a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_parsing_parse_tree/index.html b/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_parsing_parse_tree/index.html deleted file mode 100644 index 058f1799..00000000 --- a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_parsing_parse_tree/index.html +++ /dev/null @@ -1,24 +0,0 @@ - -Pb_parsing_parse_tree (ocaml-protoc.Ocaml_protoc_compiler_lib.Pb_parsing_parse_tree)

Module Ocaml_protoc_compiler_lib.Pb_parsing_parse_tree

Protobuf parse tree

type message_field_label = [
  1. | `Optional
  2. | `Required
  3. | `Repeated
  4. | `Nolabel
]

A field property defining its occurence

type oneof_field_label = unit

Oneof field fields label

Oneof fields have no label, they are simply choices for the oneof fiel they belong to.

type 'a field = {
  1. field_name : string;
  2. field_number : int;
  3. field_label : 'a;
  4. field_type : Pb_field_type.unresolved_t;
  5. field_options : Pb_option.set;
}

message field.

Note this field is parametrized with the label type so that it can be used both by normal field and one of field since the only difference between the 2 is the label.

type message_field = message_field_label field
type oneof_field = oneof_field_label field
type map_field = {
  1. map_name : string;
  2. map_number : int;
  3. map_key_type : Pb_field_type.map_key_type;
  4. map_value_type : Pb_field_type.unresolved_t;
  5. map_options : Pb_option.set;
}
type oneof_body_content =
  1. | Oneof_field of oneof_field
  2. | Oneof_option of Pb_option.t
type oneof = {
  1. oneof_name : string;
  2. oneof_body : oneof_body_content list;
}

oneof entity

type enum_value = {
  1. enum_value_name : string;
  2. enum_value_int : int;
  3. enum_value_options : Pb_option.set;
}
type enum_body_content =
  1. | Enum_value of enum_value
  2. | Enum_option of Pb_option.t
type enum = {
  1. enum_id : int;
  2. enum_name : string;
  3. enum_body : enum_body_content list;
}
type extension_range_to =
  1. | To_max
  2. | To_number of int
type extension_range_from = int
type extension_range =
  1. | Extension_single_number of int
  2. | Extension_range of extension_range_from * extension_range_to
type message_body_content =
  1. | Message_field of message_field
  2. | Message_map_field of map_field
  3. | Message_oneof_field of oneof
  4. | Message_sub of message
  5. | Message_enum of enum
  6. | Message_extension of extension_range list
  7. | Message_reserved of extension_range list
  8. | Message_option of Pb_option.t

Body content defines all the possible consituant of a message.

and message = {
  1. id : int;
  2. message_name : string;
  3. message_body : message_body_content list;
}

Message entity.

Note the ID is simply for uniquely (and easily) identifying a type. It is expected to be generated by a parser. The later compilation functions expects this id to be unique.

type rpc = {
  1. rpc_name : string;
  2. rpc_options : Pb_option.set;
  3. rpc_req_stream : bool;
  4. rpc_req : Pb_field_type.unresolved_t;
  5. rpc_res_stream : bool;
  6. rpc_res : Pb_field_type.unresolved_t;
}
type service_body_content =
  1. | Service_rpc of rpc
  2. | Service_option of Pb_option.t
type service = {
  1. service_name : string;
  2. service_body : service_body_content list;
}
type extend = {
  1. id : int;
  2. extend_name : string;
  3. extend_body : message_field list;
}
type import = {
  1. file_name : string;
  2. public : bool;
}
type proto = {
  1. proto_file_name : string option;
  2. syntax : string option;
  3. imports : import list;
  4. file_options : Pb_option.set;
  5. package : string option;
  6. messages : message list;
  7. services : service list;
  8. enums : enum list;
  9. extends : extend list;
}

Definition of a protobuffer message file.

val pp_message_field_label : - Stdlib.Format.formatter -> - [< `Nolabel | `Optional | `Repeated | `Required ] -> - unit
val pp_oneof_field_label : 'a -> unit -> unit
val pp_field : - (Stdlib.Format.formatter -> 'a -> unit) -> - Stdlib.Format.formatter -> - 'b field -> - unit
val pp_message_field : - Stdlib.Format.formatter -> - [< `Nolabel | `Optional | `Repeated | `Required ] field -> - unit
val pp_oneof_field : Stdlib.Format.formatter -> unit field -> unit
val pp_map_field : Stdlib.Format.formatter -> map_field -> unit
val pp_oneof_body_content : - Stdlib.Format.formatter -> - oneof_body_content -> - unit
val pp_oneof : Stdlib.Format.formatter -> oneof -> unit
val pp_enum_value : Stdlib.Format.formatter -> enum_value -> unit
val pp_enum_body_content : Stdlib.Format.formatter -> enum_body_content -> unit
val pp_enum : Stdlib.Format.formatter -> enum -> unit
val pp_extension_range_to : - Stdlib.Format.formatter -> - extension_range_to -> - unit
val pp_extension_range_from : Stdlib.Format.formatter -> int -> unit
val pp_extension_range : Stdlib.Format.formatter -> extension_range -> unit
val pp_message_body_content : - Stdlib.Format.formatter -> - message_body_content -> - unit
val pp_message : Stdlib.Format.formatter -> message -> unit
val pp_rpc : Stdlib.Format.formatter -> rpc -> unit
val pp_service_body_content : - Stdlib.Format.formatter -> - service_body_content -> - unit
val pp_service : Stdlib.Format.formatter -> service -> unit
val pp_extend : Stdlib.Format.formatter -> extend -> unit
val pp_import : Stdlib.Format.formatter -> import -> unit
val pp_proto : Stdlib.Format.formatter -> proto -> unit
diff --git a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_parsing_parser/index.html b/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_parsing_parser/index.html deleted file mode 100644 index f887dd7e..00000000 --- a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_parsing_parser/index.html +++ /dev/null @@ -1,44 +0,0 @@ - -Pb_parsing_parser (ocaml-protoc.Ocaml_protoc_compiler_lib.Pb_parsing_parser)

Module Ocaml_protoc_compiler_lib.Pb_parsing_parser

type token =
  1. | T_required
  2. | T_optional
  3. | T_repeated
  4. | T_one_of of Pb_location.t
  5. | T_message
  6. | T_enum
  7. | T_package
  8. | T_import of Pb_location.t
  9. | T_public
  10. | T_option
  11. | T_extensions
  12. | T_extend
  13. | T_reserved
  14. | T_returns
  15. | T_rpc
  16. | T_service
  17. | T_stream
  18. | T_syntax
  19. | T_to
  20. | T_max
  21. | T_map
  22. | T_rbrace
  23. | T_lbrace
  24. | T_rbracket
  25. | T_lbracket
  26. | T_rparen
  27. | T_lparen
  28. | T_greater
  29. | T_less
  30. | T_equal
  31. | T_semi
  32. | T_colon
  33. | T_comma
  34. | T_string of string
  35. | T_int of int
  36. | T_float of float
  37. | T_ident of Pb_location.t * string
  38. | T_eof
val field_options_ : - (Stdlib.Lexing.lexbuf -> token) -> - Stdlib.Lexing.lexbuf -> - Pb_option.set
val normal_field_ : - (Stdlib.Lexing.lexbuf -> token) -> - Stdlib.Lexing.lexbuf -> - Pb_parsing_parse_tree.message_field
val enum_value_ : - (Stdlib.Lexing.lexbuf -> token) -> - Stdlib.Lexing.lexbuf -> - Pb_parsing_parse_tree.enum_body_content
val enum_ : - (Stdlib.Lexing.lexbuf -> token) -> - Stdlib.Lexing.lexbuf -> - Pb_parsing_parse_tree.enum
val oneof_ : - (Stdlib.Lexing.lexbuf -> token) -> - Stdlib.Lexing.lexbuf -> - Pb_parsing_parse_tree.oneof
val message_ : - (Stdlib.Lexing.lexbuf -> token) -> - Stdlib.Lexing.lexbuf -> - Pb_parsing_parse_tree.message
val service_ : - (Stdlib.Lexing.lexbuf -> token) -> - Stdlib.Lexing.lexbuf -> - Pb_parsing_parse_tree.service
val proto_ : - (Stdlib.Lexing.lexbuf -> token) -> - Stdlib.Lexing.lexbuf -> - Pb_parsing_parse_tree.proto
val import_ : - (Stdlib.Lexing.lexbuf -> token) -> - Stdlib.Lexing.lexbuf -> - Pb_parsing_parse_tree.import
val option_ : - (Stdlib.Lexing.lexbuf -> token) -> - Stdlib.Lexing.lexbuf -> - Pb_option.t
val extension_range_list_ : - (Stdlib.Lexing.lexbuf -> token) -> - Stdlib.Lexing.lexbuf -> - Pb_parsing_parse_tree.extension_range list
val extension_ : - (Stdlib.Lexing.lexbuf -> token) -> - Stdlib.Lexing.lexbuf -> - Pb_parsing_parse_tree.extension_range list
val reserved_ : - (Stdlib.Lexing.lexbuf -> token) -> - Stdlib.Lexing.lexbuf -> - Pb_parsing_parse_tree.extension_range list
val extend_ : - (Stdlib.Lexing.lexbuf -> token) -> - Stdlib.Lexing.lexbuf -> - Pb_parsing_parse_tree.extend
diff --git a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_parsing_util/index.html b/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_parsing_util/index.html deleted file mode 100644 index b263e252..00000000 --- a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_parsing_util/index.html +++ /dev/null @@ -1,44 +0,0 @@ - -Pb_parsing_util (ocaml-protoc.Ocaml_protoc_compiler_lib.Pb_parsing_util)

Module Ocaml_protoc_compiler_lib.Pb_parsing_util

Parse tree utilities

This module defines convenient function to create and manipulate the parse tree.

Creators

val field : - ?options:Pb_option.set -> - label:Pt.message_field_label -> - number:int -> - type_:string -> - string -> - Pt.message_field
val map_field : - ?options:Pb_option.set -> - number:int -> - key_type:string -> - value_type:string -> - string -> - Pt.map_field
val oneof_field : - ?options:Pb_option.set -> - number:int -> - type_:string -> - string -> - Pt.oneof_body_content
val oneof_option : Pb_option.t -> Pt.oneof_body_content
val oneof : ?oneof_body:Pt.oneof_body_content list -> string -> Pt.oneof
val message_body_field : Pt.message_field -> Pt.message_body_content
val message_body_map_field : Pt.map_field -> Pt.message_body_content
val message_body_oneof_field : Pt.oneof -> Pt.message_body_content
val enum_value : - int_value:int -> - ?options:Pb_option.set -> - string -> - Pt.enum_body_content
val enum_option : Pb_option.t -> Pt.enum_body_content
val enum : ?enum_body:Pt.enum_body_content list -> string -> Pt.enum
val extension_range_single_number : int -> Pt.extension_range
val extension_range_range : - int -> - [ `Max | `Number of int ] -> - Pt.extension_range
val message_body_sub : Pt.message -> Pt.message_body_content
val message_body_enum : Pt.enum -> Pt.message_body_content
val message_body_extension : Pt.extension_range list -> Pt.message_body_content
val message_body_reserved : Pt.extension_range list -> Pt.message_body_content
val message_body_option : Pb_option.t -> Pt.message_body_content
val message : content:Pt.message_body_content list -> string -> Pt.message
val rpc : - ?options:Pb_option.set -> - req_stream:bool -> - req:string -> - res_stream:bool -> - res:string -> - string -> - Pt.rpc
val service_body_option : Pb_option.t -> Pt.service_body_content
val service_body_rpc : Pt.rpc -> Pt.service_body_content
val service : content:Pt.service_body_content list -> string -> Pt.service
val import : ?public:unit -> string -> Pt.import
val extend : string -> Pt.message_field list -> Pt.extend
val proto : - ?syntax:string -> - ?file_option:Pb_option.t -> - ?package:string -> - ?import:Pt.import -> - ?message:Pt.message -> - ?service:Pt.service -> - ?enum:Pt.enum -> - ?proto:Pt.proto -> - ?extend:Pt.extend -> - unit -> - Pt.proto

proto ~message ~proto () will add message to proto and return a the updated proto value.

val finalize_proto_value : Pt.proto -> Pt.proto

Miscellaneous functionality

val message_printer : ?level:int -> Pt.message -> unit
diff --git a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_typing/index.html b/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_typing/index.html deleted file mode 100644 index a29bbcfb..00000000 --- a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_typing/index.html +++ /dev/null @@ -1,4 +0,0 @@ - -Pb_typing (ocaml-protoc.Ocaml_protoc_compiler_lib.Pb_typing)

Module Ocaml_protoc_compiler_lib.Pb_typing

Typing compilation step

This module performs the typing step in the compilation process by doing the following:

perform_typing parsed_tree returned the type tree organized in groups of fully resolved types. Each group contains all the mutually recursive types and the type group by reverse dependency order.

diff --git a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_typing_graph/index.html b/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_typing_graph/index.html deleted file mode 100644 index a136bae5..00000000 --- a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_typing_graph/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Pb_typing_graph (ocaml-protoc.Ocaml_protoc_compiler_lib.Pb_typing_graph)

Module Ocaml_protoc_compiler_lib.Pb_typing_graph

Graph algorithms to support the recursion analysis

Types

type id = int

Identifier of a node in the graph

type node

Node in a graph, each node is identified using a unique int id

type graph

Graph.

Creators

val create_node : id -> id list -> node

create_node id sub create a node uniquely identified with id and connections to other nodes in sub.

The client application is responsible to ensure that the graph is consistent, by adding all nodes identified in sub to the same graph later.

val empty_graph : graph

empty_graph () create a new empty graph.

val add_node : node -> graph -> graph

add_node node graph add node to graph

Algorithms

val tarjan : graph -> id list list

tarjan graph compute the ordered list of strongly connected components of a graph.

The returned list is order in decreasing order of dependencies. This means the last component of the list does not link to any other components.

diff --git a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_typing_recursion/index.html b/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_typing_recursion/index.html deleted file mode 100644 index 49aa303a..00000000 --- a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_typing_recursion/index.html +++ /dev/null @@ -1,4 +0,0 @@ - -Pb_typing_recursion (ocaml-protoc.Ocaml_protoc_compiler_lib.Pb_typing_recursion)

Module Ocaml_protoc_compiler_lib.Pb_typing_recursion

Mutually recursive type resolution

The protobuf syntax allows the definition of mutually recursive types, however this declaration is implicit (ie no dedicated syntax to group together types which are mutually recursive).

OCaml requires mutually recursive types to be defined with an explicit syntax (using the and keyword), therefore it is necessary to find all the mutually recursive protobuf types.

This module performs the recursion analysis using the Tarjan graph algorithm to find all the Strongly Connnected Components.

group types returns the list of all the mutually recursive group of types in reverse order of dependency. In other the last group of types of the returned list don't depend on any other types.

diff --git a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_typing_resolution/Types_by_scope/index.html b/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_typing_resolution/Types_by_scope/index.html deleted file mode 100644 index 63593304..00000000 --- a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_typing_resolution/Types_by_scope/index.html +++ /dev/null @@ -1,6 +0,0 @@ - -Types_by_scope (ocaml-protoc.Ocaml_protoc_compiler_lib.Pb_typing_resolution.Types_by_scope)

Module Pb_typing_resolution.Types_by_scope

Custom container for all the types (message or enums) which are organized by their scope. This allow efficient search of a type given its type path

The construction of this container is the first step in the type resolution.

type t

container type

val empty : t

empty container

add a protobuf type

find a protobuf type given its type path

val print : Stdlib.out_channel -> t -> unit

pretty print of the container

diff --git a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_typing_resolution/index.html b/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_typing_resolution/index.html deleted file mode 100644 index 6245fe4d..00000000 --- a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_typing_resolution/index.html +++ /dev/null @@ -1,7 +0,0 @@ - -Pb_typing_resolution (ocaml-protoc.Ocaml_protoc_compiler_lib.Pb_typing_resolution)

Module Ocaml_protoc_compiler_lib.Pb_typing_resolution

Type resolution.

This module resolves all the user defined for the protobuf message fields; while built-in types were previously valided in Pb_typing_validation module.

After this resolution is complete each user defined field type will be a link to a unique message type identify by its id; in other word the type graph will is complete.

If the resolution fails then Pb_exception.Compilation_error is raised.

module Types_by_scope : sig ... end

Custom container for all the types (message or enums) which are organized by their scope. This allow efficient search of a type given its type path

resolve_types types resolves all the field types for all the types. If a field cannot be resolved then Pb_exception.Compilation_error is raised.

diff --git a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_typing_type_tree/index.html b/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_typing_type_tree/index.html deleted file mode 100644 index 91c80771..00000000 --- a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_typing_type_tree/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Pb_typing_type_tree (ocaml-protoc.Ocaml_protoc_compiler_lib.Pb_typing_type_tree)

Module Ocaml_protoc_compiler_lib.Pb_typing_type_tree

Protobuf typed tree.

The typetree type is parametrized to allow for 2 phase compilation.

type ('a, 'b) field = {
  1. field_parsed : 'b Pt.field;
  2. field_type : 'a Pb_field_type.t;
  3. field_default : Pb_option.constant option;
  4. field_options : Pb_option.set;
}

Field definition.

  • 'a is for unresolved or resolved
  • 'b is for field_label to account for both normal and one of fields.
type 'a oneof_field = ('a, Pt.oneof_field_label) field
type 'a message_field = ('a, Pt.message_field_label) field
type 'a map_field = {
  1. map_name : string;
  2. map_number : int;
  3. map_key_type : Pb_field_type.map_key_type;
  4. map_value_type : 'a Pb_field_type.t;
  5. map_options : Pb_option.set;
}

Map definition

type 'a oneof = {
  1. oneof_name : string;
  2. oneof_fields : 'a oneof_field list;
  3. oneof_options : Pb_option.set;
}

Oneof definition

type type_scope = {
  1. packages : string list;
  2. message_names : string list;
}

Type scope

The scope of a type (message or enum) is defined by the package (defined in the top of the proto file as well as the messages above it since a message definition can be nested

type 'a message_body_content =
  1. | Message_field of 'a message_field
  2. | Message_oneof_field of 'a oneof
  3. | Message_map_field of 'a map_field

item for the message body

and 'a message = {
  1. extensions : Pt.extension_range list;
  2. message_options : Pb_option.set;
  3. message_name : string;
  4. message_body : 'a message_body_content list;
}
type enum_value = {
  1. enum_value_name : string;
  2. enum_value_int : int;
  3. enum_value_options : Pb_option.set;
}
type enum = {
  1. enum_name : string;
  2. enum_values : enum_value list;
  3. enum_options : Pb_option.set;
}
type 'a proto_type_spec =
  1. | Enum of enum
  2. | Message of 'a message
type 'a proto_type = {
  1. scope : type_scope;
  2. id : int;
  3. file_name : string;
  4. file_options : Pb_option.set;
  5. spec : 'a proto_type_spec;
}
type 'a rpc = {
  1. rpc_name : string;
  2. rpc_options : Pb_option.set;
  3. rpc_req_stream : bool;
  4. rpc_req : 'a;
  5. rpc_res_stream : bool;
  6. rpc_res : 'a;
}

A RPC specification.

type 'a service = {
  1. service_name : string;
  2. service_file_name : string;
  3. service_packages : string list;
    (*

    Package in which this belongs

    *)
  4. service_body : 'a rpc list;
}

A service, composed of multiple RPCs.

type 'a proto = {
  1. proto_types : 'a proto_type list list;
    (*

    List of strongly connected type definitions

    *)
  2. proto_services : 'a service list;
}

A proto file is composed of a list of types and a list of services.

diff --git a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_typing_util/index.html b/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_typing_util/index.html deleted file mode 100644 index d771cf42..00000000 --- a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_typing_util/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Pb_typing_util (ocaml-protoc.Ocaml_protoc_compiler_lib.Pb_typing_util)

Module Ocaml_protoc_compiler_lib.Pb_typing_util

Typed tree utilities

This module provides accessor/creator function to facilitate the manipulation of the type tree.

Accessors for Tt.field type

val field_name : ('a, 'b) Tt.field -> string

field_name field returns the name field

val field_number : ('a, 'b) Tt.field -> int

field_number field returns the number of field

val field_type : ('a, 'b) Tt.field -> 'a Pb_field_type.t

field_type field returns the type of field

val field_label : ('a, 'b) Tt.field -> 'b

field_label field returns the label of field

val field_default : ('a, 'b) Tt.field -> Pb_option.constant option

field_default field returns the default value of field

val field_options : ('a, 'b) Tt.field -> Pb_option.set
val field_option : ('a, 'b) Tt.field -> string -> Pb_option.value option

field_option field option_name returns the constant associated with option_name. If the fields options does not contain option_name None is returned.

val type_of_id : 'a Tt.proto_type list -> int -> 'a Tt.proto_type

type_of_id all_types id returns the type associated with the given id, raise Not_found if the type is not in the all_types.

val string_of_message : int -> Tt.type_scope -> 'a Tt.message -> string
val message_option : 'a Tt.message -> string -> Pb_option.value option
val enum_option : Tt.enum -> string -> Pb_option.value option

Accessor for Tt.type

val type_name_of_type : 'a Tt.proto_type -> string

type_name_of_type t returns the type name (as defined in the message file) of t.

val type_scope_of_type : 'a Tt.proto_type -> Tt.type_scope

type_scope_of_type t returns the scope of type t.

val is_empty_message : 'a Tt.proto_type -> bool

is_empty_message t returns true if t is a message type and has no fields defined.

Creator

val empty_scope : Tt.type_scope
diff --git a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_typing_validation/index.html b/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_typing_validation/index.html deleted file mode 100644 index 76465b0d..00000000 --- a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_typing_validation/index.html +++ /dev/null @@ -1,8 +0,0 @@ - -Pb_typing_validation (ocaml-protoc.Ocaml_protoc_compiler_lib.Pb_typing_validation)

Module Ocaml_protoc_compiler_lib.Pb_typing_validation

Typed tree construction and validation

This module focuses on building the Type tree from the parse tree and provides a number of validation in doing so.

Not that the field types are not resolved, and the returned type tree is hence of type unresolved_field_type Pb_typing_type_tree.proto_type. The type resolution is done in Pb_typing_resolution

Type tree construction

validate file_name proto makes a first phase compilation of the parsed tree.

Testing Only

val validate_message : - ?parent_options:Pb_option.set -> - string -> - Pb_option.set -> - Tt.type_scope -> - Pt.message -> - Pb_field_type.unresolved Tt.proto_type list
diff --git a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_util/List/index.html b/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_util/List/index.html deleted file mode 100644 index fa8f9bc3..00000000 --- a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_util/List/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -List (ocaml-protoc.Ocaml_protoc_compiler_lib.Pb_util.List)

Module Pb_util.List

val pop_last : 'a list -> 'a list

pop_last l removes the last element from the list

val apply_until : ('a -> 'b option) -> 'a list -> 'b option

apply_until f l applies f ei until it returns Some x

If the end of the list is reached without f returning Some _ then None is returned.

val filter_map : ('a -> 'b option) -> 'a list -> 'b list

filter_map f l returns the list of element x for which f returned Some x. The length of the returned list will be less or equal than the length of the input list l.

val find_opt : ('a -> bool) -> 'a list -> 'a option
val find_map : ('a -> 'b option) -> 'a list -> 'b option
diff --git a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_util/Option/index.html b/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_util/Option/index.html deleted file mode 100644 index c0c29993..00000000 --- a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_util/Option/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Option (ocaml-protoc.Ocaml_protoc_compiler_lib.Pb_util.Option)

Module Pb_util.Option

val default : 'a -> 'a option -> 'a

option_default x o returns x is o is None otherwise y when o is Some y.

val min_value : 'a option -> 'a option -> 'a option

min_value x y returns the min value of the x and y if x and y are of the form Some _. If x or y is None then Invalid_argument exception is raised

val eq_value : 'a option -> 'a option -> bool

eq_value x y returns true if both x and y are of the form Some _. If x or y is None then Invalid_argument exception is raised

val string_of_option : ('a -> string) -> 'a option -> string

string_of_option f x returns string representation of x using f when x is of the form Some _.

diff --git a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_util/index.html b/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_util/index.html deleted file mode 100644 index e15b7cac..00000000 --- a/dev/ocaml-protoc/Ocaml_protoc_compiler_lib/Pb_util/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Pb_util (ocaml-protoc.Ocaml_protoc_compiler_lib.Pb_util)

Module Ocaml_protoc_compiler_lib.Pb_util

Standard library missing functions

val rev_split_by_char : char -> string -> string list

rev_split_by_char c s will split the string s using the delimieter c and return the component in reverse order (ie from right to left).

For instance when splitting a filename with the '.' character, the file extension will be the head of the returned list.

val string_of_string_list : string list -> string

string_of_string_list l returns a debug string of l

val string_fold_lefti : ('a -> int -> char -> 'a) -> 'a -> string -> 'a

string_fold_lefti f e0 s will fold over each string character

val indentation_prefix : int -> string

indentation_prefix level returns a string of 2 * level spaces

module Option : sig ... end
val read_file : string -> string
val protect : finally:(unit -> unit) -> (unit -> 'a) -> 'a
module List : sig ... end
module Str_map : Stdlib.Map.S with type key = string
module Int_map : Stdlib.Map.S with type key = int
diff --git a/dev/pbrt/Pbrt/Decoder/index.html b/dev/pbrt/Pbrt/Decoder/index.html deleted file mode 100644 index 7893ee29..00000000 --- a/dev/pbrt/Pbrt/Decoder/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Decoder (pbrt.Pbrt.Decoder)

Module Pbrt.Decoder

Decoding protobufs.

Types

type t

The decoder

Creator

val of_bytes : bytes -> t

of_bytes b creates a decoder positioned at start of bytes b.

val of_subbytes : bytes -> int -> int -> t

of_subbytes b offset len creates a decoder positioned at offset in bytes b, reading at most len bytes. This is similar to of_bytes (Bytes.sub b offset len) but doesn't copy.

  • since 3.0
val of_string : string -> t

of_string s creates a decoder positioned at start of string s.

val of_substring : string -> int -> int -> t

See of_subbytes.

  • since 3.0

Errors

type error =
  1. | Incomplete
  2. | Overlong_varint
  3. | Malformed_field
  4. | Overflow of string
  5. | Unexpected_payload of string * payload_kind
  6. | Missing_field of string
  7. | Malformed_variant of string
val error_to_string : error -> string

error_to_string e converts error e to its string representation.

exception Failure of error

Raised in decoding combinators

val malformed_variant : string -> 'a

malformed_variant variant_name raises the exception Protobuf.Decoder.Failure (Malformed_variant variant_name)

val unexpected_payload : string -> payload_kind -> 'a

unexpected_payload field_name pk raises the exception Protobuf.Decoder.Failure (Unexpected_payload (field_name, pk))

val missing_field : string -> 'a

missing_field field_name raises the exception Protobuf.Decoder.Failure (Missing_field field_name)

Decoding Functions

val key : t -> (int * payload_kind) option

key d reads a key and a payload kind from d. If d has exhausted its input when the function is called, returns None. If d has exhausted its input while reading, raises Failure Incomplete. If the payload kind is unknown, raises Failure Malformed_field.

val skip : t -> payload_kind -> unit

skip d pk skips the next value of kind pk in d. If skipping the value would exhaust input of d, raises Encoding_error Incomplete.

val nested : t -> t

nested d returns a decoder for a message nested in d. If reading the message would exhaust input of d, raises Failure Incomplete.

val map_entry : t -> decode_key:(t -> 'a) -> decode_value:(t -> 'b) -> 'a * 'b
val empty_nested : t -> unit

empty_nested d skips an empty message of 0 length. If reading the message would exhaust input of d, raises Failure Incomplete.

val packed_fold : ('a -> t -> 'a) -> 'a -> t -> 'a

packed_fold f e0 d folds over the a packed encoding with f acc d and initial value e0. If reading the message would exhaust input of d, raises Failure Incomplete.

val int_as_varint : t -> int

int_as_varint d reads an int value from d with Varint encoding. If the integer value read cannot be converted to int raises Failure Overflow "". If reading the message would exhaust input of d, raises Failure Incomplete.

val int_as_zigzag : t -> int

int_as_zigzag d reads an int value from d with zigzag encoding. If the integer value read cannot be converted to int raises Failure Overflow "". If reading the message would exhaust input of d, raises Failure Incomplete.

val int32_as_varint : t -> int32

int32_as_varint d reads an int32 value from d with Varint encoding. If the integer value read cannot be converted to int32 raises Failure Overflow "". If reading the message would exhaust input of d, raises Failure Incomplete.

val int32_as_zigzag : t -> int32

int32_as_varint d reads an int32 value from d with zigzag encoding. If the integer value read cannot be converted to int32 raises Failure Overflow "". If reading the message would exhaust input of d, raises Failure Incomplete.

val int64_as_varint : t -> int64

int64_as_varint d reads an int64 value from d with Varint encoding. If reading the message would exhaust input of d, raises Failure Incomplete.

val int64_as_zigzag : t -> int64

int64_as_varint d reads an int64 value from d with zigzag encoding. If reading the message would exhaust input of d, raises Failure Incomplete.

val int32_as_bits32 : t -> int32

int32_as_bits32 d reads an int32 value from d with 32 bit encoding. If reading the message would exhaust input of d, raises Failure Incomplete.

val int64_as_bits64 : t -> int64

int64_as_bits64 d reads an int64 value from d with 64 bit encoding. If reading the message would exhaust input of d, raises Failure Incomplete.

val uint32_as_varint : t -> [ `unsigned of int32 ]
val uint32_as_zigzag : t -> [ `unsigned of int32 ]
val uint64_as_varint : t -> [ `unsigned of int64 ]
val uint64_as_zigzag : t -> [ `unsigned of int64 ]
val uint32_as_bits32 : t -> [ `unsigned of int32 ]
val uint64_as_bits64 : t -> [ `unsigned of int64 ]
val bool : t -> bool

bool d reads a bool value from d with varing encoding. If the boolean value in d is neither 0 or 1 raises Failure Overflow "". If reading the message would exhaust input of d, raises Failure Incomplete.

val float_as_bits32 : t -> float

float_as_bits32 d reads a float value from d with 32 bit encoding. If reading the message would exhaust input of d, raises Failure Incomplete.

val float_as_bits64 : t -> float

float_as_bits64 d reads a float value from d with 64 bit encoding. If reading the message would exhaust input of d, raises Failure Incomplete.

val int_as_bits32 : t -> int

int_as_bits32 d reads a int value from d with 32 bit encoding. If the integer value read cannot be converted to int raises Failure Overflow "". If reading the message would exhaust input of d, raises Failure Incomplete.

val int_as_bits64 : t -> int

int_as_bits64 d reads a int value from d with 64 bit encoding. If the integer value read cannot be converted to int raises Failure Overflow "". If reading the message would exhaust input of d, raises Failure Incomplete.

val string : t -> string

string d reads a string value from d. If reading the message would exhaust input of d, raises Failure Incomplete.

val bytes : t -> bytes

bytes d reads a bytes value from d. If reading the message would exhaust input of d, raises Failure Incomplete.

val wrapper_double_value : t -> float option
val wrapper_float_value : t -> float option
val wrapper_int64_value : t -> int64 option
val wrapper_int32_value : t -> int32 option
val wrapper_bool_value : t -> bool option
val wrapper_string_value : t -> string option
val wrapper_bytes_value : t -> bytes option
diff --git a/dev/pbrt/Pbrt/Encoder/index.html b/dev/pbrt/Pbrt/Encoder/index.html deleted file mode 100644 index a3537dfa..00000000 --- a/dev/pbrt/Pbrt/Encoder/index.html +++ /dev/null @@ -1,7 +0,0 @@ - -Encoder (pbrt.Pbrt.Encoder)

Module Pbrt.Encoder

Encoding protobufs.

Types

type t

A (mutable) encoder.

This encoder can be re-used, see clear.

Error

type error =
  1. | Overflow of string
val error_to_string : error -> string
exception Failure of error

Creator

val create : ?size:int -> unit -> t

Create a new encoder.

val clear : t -> unit

Clear the content of the internal buffer(s), but does not release memory. This makes the encoder ready to encode another message.

  • parameter size

    initial size in bytes

  • since 2.1
val reset : t -> unit

Clears the content and resets internal storage to its initial memory consumption.

This is more costly than clear but can be useful after a very large message was encoded.

  • since 2.1

Convertion

val to_bytes : t -> bytes

Extract the content of the encoder to bytes.

val to_string : t -> string

Extract the content of the encoder to a string. Call this after encoding a message into the encoder.

val write_chunks : (bytes -> int -> int -> unit) -> t -> unit

write_chunks w e calls the write function w (e.g output oc for some output channel oc) on every chunk inside e. The number of chunks is an implementation detail.

  • since 2.1

Encoding Functions

These combinators are used by generated code (or user combinators) to encode a OCaml value into the wire representation of protobufs.

val key : int -> payload_kind -> t -> unit

key k pk e writes a key and a payload kind to e.

val nested : ('a -> t -> unit) -> 'a -> t -> unit

nested f x e applies f x to an encoder for a message nested in e.

val map_entry : - encode_key:('a -> t -> unit) -> - encode_value:('b -> t -> unit) -> - (('a * payload_kind) * ('b * payload_kind)) -> - t -> - unit
val empty_nested : t -> unit

nested f e encodes a zero length empty message

val int_as_varint : int -> t -> unit

int_as_varint i e encodes i in e with Varint encoding

val int_as_zigzag : int -> t -> unit

int_as_zigzag i e encodes i in e with Varint zigzag encoding

val int32_as_varint : int32 -> t -> unit

int32_as_varint i e encodes i in e with Varint encoding

val int32_as_zigzag : int32 -> t -> unit

int32_as_varint i e encodes i in e with Varint zigzag encoding

val int64_as_varint : int64 -> t -> unit

int64_as_varint i e encodes i in e with Varint encoding

val int64_as_zigzag : int64 -> t -> unit

int64_as_varint i e encodes i in e with Varint zigzag encoding

val int32_as_bits32 : int32 -> t -> unit

int32_as_varint i e encodes i in e with Bits32 encoding

val int64_as_bits64 : int64 -> t -> unit

int64_as_varint i e encodes i in e with Bits64 encoding

val uint32_as_varint : [ `unsigned of int32 ] -> t -> unit
val uint32_as_zigzag : [ `unsigned of int32 ] -> t -> unit
val uint64_as_varint : [ `unsigned of int64 ] -> t -> unit
val uint64_as_zigzag : [ `unsigned of int64 ] -> t -> unit
val uint32_as_bits32 : [ `unsigned of int32 ] -> t -> unit
val uint64_as_bits64 : [ `unsigned of int64 ] -> t -> unit
val bool : bool -> t -> unit

encode b e encodes b in e with Varint encoding

val float_as_bits32 : float -> t -> unit

float_as_bits32 f e encodes f in e with Bits32 encoding

val float_as_bits64 : float -> t -> unit

float_as_bits64 f e encodes f in e with Bits64 encoding

val int_as_bits32 : int -> t -> unit

int_as_bits32 i e encodes i in e with Bits32 encoding TODO : add error handling

val int_as_bits64 : int -> t -> unit

int_as_bits64 i e encodes i in e with Bits64 encoding

val string : string -> t -> unit

string s e encodes s in e

val bytes : bytes -> t -> unit

string s e encodes s in e

val wrapper_double_value : float option -> t -> unit
val wrapper_float_value : float option -> t -> unit
val wrapper_int64_value : int64 option -> t -> unit
val wrapper_int32_value : int32 option -> t -> unit
val wrapper_bool_value : bool option -> t -> unit
val wrapper_string_value : string option -> t -> unit
val wrapper_bytes_value : bytes option -> t -> unit
diff --git a/dev/pbrt/Pbrt/List_util/index.html b/dev/pbrt/Pbrt/List_util/index.html deleted file mode 100644 index 5b9f2662..00000000 --- a/dev/pbrt/Pbrt/List_util/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -List_util (pbrt.Pbrt.List_util)

Module Pbrt.List_util

val rev_iter_with : ('a -> 'b -> unit) -> 'a list -> 'b -> unit

iter_rev_with f l st iterate over the list in reverse order, passing items and st to f.

diff --git a/dev/pbrt/Pbrt/Pp/index.html b/dev/pbrt/Pbrt/Pp/index.html deleted file mode 100644 index 2070a522..00000000 --- a/dev/pbrt/Pbrt/Pp/index.html +++ /dev/null @@ -1,18 +0,0 @@ - -Pp (pbrt.Pbrt.Pp)

Module Pbrt.Pp

Runtime functions for Pretty Printing functionality

type formatter = Stdlib.Format.formatter
val pp_unit : formatter -> unit -> unit

pp_unit fmt () formats unit value

val pp_int : formatter -> int -> unit

pp_unit fmt i formats i value

val pp_float : formatter -> float -> unit

pp_unit fmt f formats f value

val pp_bool : formatter -> bool -> unit

pp_unit fmt b formats b value

val pp_int32 : formatter -> int32 -> unit

pp_unit fmt i formats i value

val pp_unsigned_of_int32 : formatter -> [ `unsigned of int32 ] -> unit
val pp_int64 : formatter -> int64 -> unit

pp_unit fmt i formats i value

val pp_unsigned_of_int64 : formatter -> [ `unsigned of int64 ] -> unit
val pp_string : formatter -> string -> unit

pp_unit fmt s formats s value

val pp_bytes : formatter -> bytes -> unit

pp_unit fmt b formats b value

val pp_option : (formatter -> 'a -> unit) -> formatter -> 'a option -> unit

pp_option f fmt o formats an option value o using f formatter when o is a Some x value

val pp_wrapper_float : formatter -> float option -> unit
val pp_wrapper_bool : formatter -> bool option -> unit
val pp_wrapper_int32 : formatter -> int32 option -> unit
val pp_wrapper_int64 : formatter -> int64 option -> unit
val pp_wrapper_string : formatter -> string option -> unit
val pp_wrapper_bytes : formatter -> bytes option -> unit
val pp_list : (formatter -> 'a -> unit) -> formatter -> 'a list -> unit

pp_list f fmt l formats a list value l using f formatter on each of the elements.

val pp_associative_list : - (formatter -> 'a -> unit) -> - (formatter -> 'b -> unit) -> - formatter -> - ('a * 'b) list -> - unit
val pp_hastable : - (formatter -> 'a -> unit) -> - (formatter -> 'b -> unit) -> - formatter -> - ('a, 'b) Stdlib.Hashtbl.t -> - unit
val pp_record_field : - ?first:bool -> - string -> - (formatter -> 'a -> unit) -> - formatter -> - 'a -> - unit

pp_record_field label_name fmt field_value formats a record field_value with label_name

val pp_brk : (formatter -> 'a -> unit) -> formatter -> 'a -> unit

pp_brk fmt r formats record value r with curly brakets.

diff --git a/dev/pbrt/Pbrt/Repeated_field/index.html b/dev/pbrt/Pbrt/Repeated_field/index.html deleted file mode 100644 index 46230d7e..00000000 --- a/dev/pbrt/Pbrt/Repeated_field/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Repeated_field (pbrt.Pbrt.Repeated_field)

Module Pbrt.Repeated_field

Optimized representation for repeated fields

type 'a t

optimized data structure for fast inserts so that decoding of repeated fields can be efficient.

Type can be constructed at no cost from an existing array.

val make : 'a -> 'a t

make v create an initial repeated field container v is not used but needed to initialize the internal array data structure.

This design flow is intentional to keep optimal performance.

Therefore lengh (make 1) will return 0.

val of_array_no_copy : 'a array -> 'a t

of_array_no_copy a initialized a new repeated field container with a.

a is not copied into a but only referenced so any later modification to any a element will affected a t container.

val length : 'a t -> int

length c returns the number of insterted element in c.

val add : 'a -> 'a t -> unit

add x c appends a to container c

This operation is not constant time since it might trigger an alocation of an array. However it is optimized for the total insert time of element one by one.

val to_array : 'a t -> 'a array

to_array c convert the repeated field container to an array.

val to_list : 'a t -> 'a list

to_list c convert the repeated field container to an list.

val iter : ('a -> unit) -> 'a t -> unit

iter f c applies f to all element in c

val iteri : (int -> 'a -> unit) -> 'a t -> unit

iteri f c applies f to all element in c

val rev_iter_with : ('a -> 'b -> unit) -> 'a t -> 'b -> unit
val fold_left : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b

fold_left f e0 c accumulates e0 through each elements

val map_to_array : ('a -> 'b) -> 'a t -> 'b array

map_to_array f c map all c element to an array containing f e_i element.

val map_to_list : ('a -> 'b) -> 'a t -> 'b list

map_to_list f c map all c element to a list containing f e_i element.

diff --git a/dev/pbrt_services/Pbrt_services/Client/index.html b/dev/pbrt_services/Pbrt_services/Client/index.html deleted file mode 100644 index 0ee2557b..00000000 --- a/dev/pbrt_services/Pbrt_services/Client/index.html +++ /dev/null @@ -1,13 +0,0 @@ - -Client (pbrt_services.Pbrt_services.Client)

Module Pbrt_services.Client

Service stubs, client side

type _ mode =
  1. | Unary : Value_mode.unary mode
  2. | Stream : Value_mode.stream mode
type ('req, 'req_mode, 'res, 'res_mode) rpc = {
  1. service_name : string;
  2. package : string list;
    (*

    Package for the service

    *)
  3. rpc_name : string;
  4. req_mode : 'req_mode mode;
  5. res_mode : 'res_mode mode;
  6. encode_json_req : 'req -> Yojson.Basic.t;
  7. encode_pb_req : 'req -> Pbrt.Encoder.t -> unit;
  8. decode_json_res : Yojson.Basic.t -> 'res;
  9. decode_pb_res : Pbrt.Decoder.t -> 'res;
}

A RPC description. You need a transport library that knows where to send the bytes to actually use it.

val mk_rpc : - ?package:string list -> - service_name:string -> - rpc_name:string -> - req_mode:'req_mode mode -> - res_mode:'res_mode mode -> - encode_json_req:('req -> Yojson.Basic.t) -> - encode_pb_req:('req -> Pbrt.Encoder.t -> unit) -> - decode_json_res:(Yojson.Basic.t -> 'res) -> - decode_pb_res:(Pbrt.Decoder.t -> 'res) -> - unit -> - ('req, 'req_mode, 'res, 'res_mode) rpc
diff --git a/dev/pbrt_services/Pbrt_services/Server/index.html b/dev/pbrt_services/Pbrt_services/Server/index.html deleted file mode 100644 index 79870fa7..00000000 --- a/dev/pbrt_services/Pbrt_services/Server/index.html +++ /dev/null @@ -1,11 +0,0 @@ - -Server (pbrt_services.Pbrt_services.Server)

Module Pbrt_services.Server

Service stubs, server side

type 'm mode = 'm Client.mode =
  1. | Unary : Value_mode.unary mode
  2. | Stream : Value_mode.stream mode
type ('req, 'req_mode, 'res, 'res_mode) rpc = {
  1. name : string;
  2. req_mode : 'req_mode mode;
  3. res_mode : 'res_mode mode;
  4. encode_json_res : 'res -> Yojson.Basic.t;
  5. encode_pb_res : 'res -> Pbrt.Encoder.t -> unit;
  6. decode_json_req : Yojson.Basic.t -> 'req;
  7. decode_pb_req : Pbrt.Decoder.t -> 'req;
}

A single RPC method, alongside encoders and decoders for input and output types. .

type any_rpc =
  1. | RPC : ('req, 'req_mode, 'res, 'res_mode) rpc -> any_rpc

A RPC endpoint.

val mk_rpc : - name:string -> - req_mode:'req_mode mode -> - res_mode:'res_mode mode -> - encode_json_res:('res -> Yojson.Basic.t) -> - encode_pb_res:('res -> Pbrt.Encoder.t -> unit) -> - decode_json_req:(Yojson.Basic.t -> 'req) -> - decode_pb_req:(Pbrt.Decoder.t -> 'req) -> - unit -> - ('req, 'req_mode, 'res, 'res_mode) rpc

Helper to build a RPC

type 'h t = {
  1. service_name : string;
    (*

    Name of the service

    *)
  2. package : string list;
    (*

    The package this belongs in (e.g. "bigco.auth.secretpasswordstash"), split along "."

    *)
  3. handlers : 'h list;
    (*

    A list of handlers

    *)
}

A service with fixed set of methods, which depends on the concrete RPC implementation. Each method is a handler of some type 'h.

diff --git a/dev/pbrt_services/Pbrt_services/Value_mode/index.html b/dev/pbrt_services/Pbrt_services/Value_mode/index.html deleted file mode 100644 index e33caff9..00000000 --- a/dev/pbrt_services/Pbrt_services/Value_mode/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Value_mode (pbrt_services.Pbrt_services.Value_mode)

Module Pbrt_services.Value_mode

Whether there's a single value or a stream of them

type unary
type stream
diff --git a/dev/pbrt_yojson/Pbrt_yojson/E/index.html b/dev/pbrt_yojson/Pbrt_yojson/E/index.html deleted file mode 100644 index 8d3244b0..00000000 --- a/dev/pbrt_yojson/Pbrt_yojson/E/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -E (pbrt_yojson.Pbrt_yojson.E)

Module Pbrt_yojson.E

All exception which could be raised by the generated JSON encoder and decode function

type error =
  1. | Unexpected_json_type of string * string
  2. | Malformed_variant of string
exception Failure of error

Decoding/Encoding failure

val unexpected_json_type : string -> string -> 'a

unexpected_json_type record_name field_name raises Failure (Unexpected_json_type (record_name, field_name))

val malformed_variant : string -> 'a

malformed_variant variant_name raise Failure (Malformed_variant variant_name)