package owi

  1. Overview
  2. Docs

Module Owi.LinkSource

Module to link a simplified/extern module and producing a runnable module along with a link state.

Sourcemodule Memory : sig ... end

runtime memory

Sourcemodule Table : sig ... end

runtime table

Sourcemodule Global : sig ... end

runtime global

Sourcemodule Env : sig ... end

runtime env

Sourcetype module_to_run = {
  1. module_ : Simplify.simplified_module;
  2. env : Env.t;
  3. to_run : (int, Types.func_type) Types.expr' list;
}

runnable module

Sourcemodule StringMap : Map.S with type key = string
Sourcetype exports = {
  1. globals : Env.t' Global.t StringMap.t;
  2. memories : Memory.t StringMap.t;
  3. tables : Env.t' Table.t StringMap.t;
  4. functions : Env.t' Value.Func.t StringMap.t;
  5. defined_names : StringSet.t;
}

runtime exported items

Sourcetype state = {
  1. by_name : exports StringMap.t;
  2. by_id : exports StringMap.t;
  3. last : exports option;
}

link state

Sourceval empty_state : state

the empty link state

link a module with a given link state, producing a runnable module and a new link state

Sourceval register_module : state -> name:string -> id:string option -> state

register a module inside a link state, producing a new link state

Sourcetype extern_module = {
  1. functions : (string * Value.Func.extern_func) list;
}

extern modules

Sourceval extern_module : string -> extern_module -> state -> state

register an extern module with a given link state, producing a new link state

OCaml

Innovation. Community. Security.