package tezos-webassembly-interpreter

  1. Overview
  2. Docs
type available_memories =
  1. | No_memories_during_init
  2. | Available_memories of Instance.memory_inst Tezos_webassembly_interpreter.Instance.Vector.t

Description of what memories are currently available.

type reveal_destination = {
  1. base : int32;
  2. max_bytes : int32;
}
type reveal =
  1. | Reveal_raw_data of string
  2. | Reveal_metadata
type ticks = Z.t
type reveal_func = available_memories -> Values.value list -> (reveal * reveal_destination, int32) Stdlib.result Lwt.t
type host_func =
  1. | Host_func of Input_buffer.t -> Output_buffer.t -> Durable_storage.t -> available_memories -> Values.value list -> (Durable_storage.t * Values.value list * ticks) Lwt.t
  2. | Reveal_func of reveal_func

The type of a Host function implementation

type registry

A (mutable) host function registry

val empty : unit -> registry

empty () creates a new empty registry

val register : global_name:string -> host_func -> registry -> unit

register ~func_name implem registers the implementation of a named host function in the global symbol table. Will erase a previous implementation for the given name.

val lookup : global_name:string -> registry -> host_func

lookup ~func_name looks for the implementation of a named host function in the global symbol table. May raise Not_found.

OCaml

Innovation. Community. Security.