package owi
Module to link a simplified/extern module and producing a runnable module along with a link state.
runtime env
type 'f module_to_run = {
modul : Simplified.modul;
env : 'f Link_env.t;
to_run : Types.simplified Types.expr list;
}
runnable module
type func := Func_intf.t
type exports = {
globals : Concrete_global.t StringMap.t;
memories : Concrete_memory.t StringMap.t;
tables : Concrete_table.t StringMap.t;
functions : func StringMap.t;
defined_names : StringSet.t;
}
runtime exported items
type 'ext envs = 'ext Link_env.t Env_id.collection
type fenvs = Concrete_value.Func.extern_func Link_env.t Env_id.collection
type 'f state = {
by_name : exports StringMap.t;
by_id : (exports * Env_id.t) StringMap.t;
last : (exports * Env_id.t) option;
collection : 'f Func_id.collection;
envs : 'f envs;
}
link state
val empty_state : 'f state
the empty link state
val modul :
'f state ->
name:string option ->
Simplified.modul ->
('f module_to_run * 'f state) Result.t
link a module with a given link state, producing a runnable module and a new link state
register a module inside a link state, producing a new link state
val extern_module' :
'f state ->
name:string ->
func_typ:('f -> Types.simplified Types.func_type) ->
'f extern_module ->
'f state
register an extern module with a given link state, producing a new link state
val extern_module :
Concrete_value.Func.extern_func state ->
name:string ->
Concrete_value.Func.extern_func extern_module ->
Concrete_value.Func.extern_func state
type extern_func = Concrete_value.Func.extern_func Func_id.collection
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>