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