Module Octez_protocol_compiler.Compiler

val default_warnings : string
val default_warn_error : string

Override the default 'Env.Persistent_signature.load' with a lookup in locally defined hashtable.

val preloaded_cmis : Persistent_env.Persistent_signature.t Tezos_base.TzPervasives.String.Hashtbl.t
val default_load : unit_name:string -> Persistent_env.Persistent_signature.t option
val load_cmi_from_file : string -> unit
val load_embedded_cmi : (string * string) -> unit
val load_embedded_cmis : (string * string) list -> unit

Compilation environment.

tezos_protocol_env defines the list of cmi available while compiling the protocol version. The cmi are packed into the octez-node binary by using ocp-ocamlres, see the Makefile.

register_env defines a complementary list of cmi available while compiling the generated register.ml file (that register the protocol first-class module into the Updater.versions hashtable).

val all_files : [< `File of string * 'a ] list -> (string * 'b) list
val tezos_protocol_env : (string * string) list
val register_env : (string * string) list

Helpers

val create_file : ?perm:Unix.file_perm -> string -> string -> unit
val debug_flag : bool Stdlib.ref
val debug : ('a, Stdlib.Format.formatter, unit) Stdlib.format -> 'b
val mktemp_dir : unit -> string

Main

type driver = {
  1. compile_ml : ?for_pack:string -> string -> string;
  2. pack_objects : string -> string list -> string;
}
val parse_options : bool -> string -> unit
val main : driver -> string -> unit