Module Runtime.Modules

type typ =
  1. | I32
  2. | I64
  3. | F32
  4. | F64
type func = {
  1. name : string;
  2. params : (string option * typ) list;
  3. results : typ list;
  4. locals : (string option * typ) list;
  5. body : Instructions.expr;
}
type memory = {
  1. min_pages : int;
  2. max_pages : int option;
}
type import_desc =
  1. | FuncImport of string * typ list * typ list
type import = {
  1. module_name : string;
  2. name : string;
  3. desc : import_desc;
}
type export_desc =
  1. | FuncExport of string
type export = {
  1. name : string;
  2. desc : export_desc;
}
type data = {
  1. offset : int;
  2. value : string;
}
type module_ = {
  1. imports : import list;
  2. exports : export list;
  3. funcs : func list;
  4. memory : memory option;
  5. data : data list;
}
val string_of_typ : typ -> string
val string_of_params : (string option * typ) list -> string
val string_of_results : typ list -> string
val string_of_locals : (string option * typ) list -> string
val string_of_func : func -> string
val string_of_import_desc : import_desc -> string
val string_of_import : import -> string
val string_of_export_desc : export_desc -> string
val string_of_export : export -> string
val string_of_memory : memory -> string
val string_of_data : data -> string
val string_of_module : module_ -> string