Milky2018/wasmoon_runtime/runtime does not have a README file
pub(open) trait GcHeap {
fn alloc_struct(Self, Int, Array[Value]) -> Int raise RuntimeError
fn alloc_array(Self, Int, Array[Value]) -> Int raise RuntimeError
fn struct_get(Self, Int, Int) -> Value raise RuntimeError
fn struct_set(Self, Int, Int, Value) -> Unit raise RuntimeError
fn array_len(Self, Int) -> Int raise RuntimeError
fn array_get(Self, Int, Int) -> Value raise RuntimeError
fn array_set(Self, Int, Int, Value) -> Unit raise RuntimeError
fn array_fill(Self, Int, Int, Value, Int) -> Unit raise RuntimeError
fn array_copy(Self, Int, Int, Int, Int, Int) -> Unit raise RuntimeError
fn get_type_idx(Self, Int) -> Int raise RuntimeError
fn is_valid(Self, Int) -> Bool
}pub(open) trait GcManager {
fn alloc_struct(Self, Int, Array[Value]) -> Int raise RuntimeError
fn alloc_array(Self, Int, Array[Value]) -> Int raise RuntimeError
fn struct_get(Self, Int, Int) -> Value raise RuntimeError
fn struct_set(Self, Int, Int, Value) -> Unit raise RuntimeError
fn array_len(Self, Int) -> Int raise RuntimeError
fn array_get(Self, Int, Int) -> Value raise RuntimeError
fn array_set(Self, Int, Int, Value) -> Unit raise RuntimeError
fn array_fill(Self, Int, Int, Value, Int) -> Unit raise RuntimeError
fn array_copy(Self, Int, Int, Int, Int, Int) -> Unit raise RuntimeError
fn get_type_idx(Self, Int) -> Int raise RuntimeError
fn is_valid(Self, Int) -> Bool
fn should_collect(Self) -> Bool
fn collect(Self, Array[Value]) -> Unit
fn stats(Self) -> GcStats
fn write_barrier(Self, Int, Value, Value) -> Unit
}pub(open) trait GcRuntime {
fn should_collect(Self) -> Bool
fn collect(Self, Array[Value]) -> Unit
fn force_collect(Self, Array[Value]) -> Unit
fn write_barrier_pre(Self, Int, Value, Value) -> Unit
fn write_barrier_post(Self, Int, Value) -> Unit
fn read_barrier(Self, Int) -> Value
fn stats(Self) -> GcStats
fn collection_count(Self) -> Int
fn set_threshold(Self, Int) -> Unit
fn get_threshold(Self) -> Int
}pub(open) trait SegmentDropBinding {
fn bind_segment_drop_flags(Self, FixedArray[Bool], FixedArray[Bool]) -> Unit
}pub(all) suberror GuestContinuationSignal {
GuestContinuationYield(GuestContinuationEffect, GuestContinuationBody)
} derive(Debug)pub(all) suberror RuntimeError {
UnsupportedHostCapability(String)
HostExit(Int)
StackUnderflow
StackOverflow
TypeMismatch
InvalidModule(String)
ForeignStore
InvalidHandle
StoreClosed
MemoryClosed
InvalidMemoryType(String)
InvalidTableType(String)
HeapRepresentationInUse
OutOfBoundsMemoryAccess
OutOfBoundsTableAccess
OutOfBoundsArrayAccess
UndefinedElement
UninitializedElement
IndirectCallTypeMismatch
DivisionByZero
IntegerOverflow
InvalidConversion
OutOfMemory
InvalidResourceLimit
InvalidExecutionLimit
ExecutionLimitsUnavailable
ExecutionCancelled
ExecutionTimedOut
ExecutionBudgetExceeded
ResourceLimitExceeded(ResourceKind)
TableAllocationOverflow
TableAllocationFailed
MemoryMinimumExceedsLimits(Int64)
AllocationTooLarge
AtomicWaitNonSharedMemory
Unreachable
UncaughtException
CallStackExhausted
UnknownImport(String, String)
LinkError
LinkErrorDetail(String)
CastFailure
NullReference
UnalignedAtomic
InvalidConstantExpression(String)
ContinuationAlreadyConsumed
UnhandledSuspension
UnsupportedGcContinuationStorage
AsyncHostRequiresAsyncCall
AsyncHostCallInProgress
AsyncHostCallCancelled
AsyncHostError(String)
} derive(Eq, Debug)impl Show for RuntimeErrorimpl Show for ArrayInstancepub struct AsyncHostCallDriver {
// private fields
}impl Debug for AsyncHostCallDriverfn AsyncHostCallDriver::poll(self : AsyncHostCallDriver, func_addr : Int, func : async (Caller, Array[Value]) -> Result[Array[Value], Error], caller : Caller, args : Array[Value]) -> AsyncHostPoll raise RuntimeErrorpub(all) struct CallStackEntry {
func_idx : Int
func_name : String?
}pub struct ExecutionScope {
// private fields
}impl Debug for ExecutionScopepub(all) enum ExternVal {
Func(Int)
Table(Int)
Memory(Int)
Global(Int)
Tag(Int)
}pub struct FunctionIdentity {
// private fields
}pub struct GCStats {
total_objects : Int
live_objects : Int
free_slots : Int
collections : Int
bytes_allocated : Int64
bytes_collected : Int64
} derive(Debug)pub struct GcRootLease {
// private fields
}pub struct GcStats {
total_slots : Int
live_objects : Int
free_slots : Int
collections : Int
bytes_allocated : Int64
bytes_collected : Int64
} derive(Debug)fn GlobalInstance::GlobalInstance(type_ : GlobalType, value : Value) -> GlobalInstance raise RuntimeErrorpub struct GuestContinuationBody {
run : (GuestContinuationInput) -> Array[Value] raise
cancel : () -> Unit
// private fields
}impl Debug for GuestContinuationBodyfn GuestContinuationBody::new(run : (GuestContinuationInput) -> Array[Value] raise, cancel : () -> Unit, roots? : Array[Value], leases? : Array[GcRootLease]) -> GuestContinuationBodytype Importspub struct InstanceAdmission {
// private fields
}type InstantiationTransactionpub struct InterpreterLimits {
max_frames : Int
max_values : Int
max_controls : Int
max_reentry_depth : Int
} derive(Debug)fn InterpreterLimits::new(max_frames? : Int, max_values? : Int, max_controls? : Int, max_reentry_depth? : Int) -> InterpreterLimits raise RuntimeErrortype Linkerfn Linker::add_global(self : Linker, mod_name : String, name : String, global : GlobalInstance) -> Unit raise RuntimeErrorfn Linker::add_host_func(self : Linker, mod_name : String, name : String, func : (Array[Value]) -> Array[Value] raise RuntimeError, func_type? : FuncType) -> Unit raise RuntimeErrorfn Linker::add_host_func_with_caller(self : Linker, mod_name : String, name : String, func : (Caller, Array[Value]) -> Array[Value] raise RuntimeError, func_type? : FuncType) -> Unit raise RuntimeErrorfn Linker::add_memory(self : Linker, mod_name : String, name : String, mem : Memory) -> Unit raise RuntimeErrorfn Linker::add_table(self : Linker, mod_name : String, name : String, table : Table) -> Unit raise RuntimeErrorfn Linker::register(self : Linker, name : String, instance : ModuleInstance) -> Unit raise RuntimeErrorimpl GcHeap for MarkSweepHeapfn alloc_array(self : MarkSweepHeap, type_idx : Int, elements : Array[Value]) -> Int raise RuntimeErrorfn alloc_struct(self : MarkSweepHeap, type_idx : Int, fields : Array[Value]) -> Int raise RuntimeErrorfn array_copy(self : MarkSweepHeap, dst_idx : Int, dst_offset : Int, src_idx : Int, src_offset : Int, count : Int) -> Unit raise RuntimeErrorfn array_fill(self : MarkSweepHeap, array_idx : Int, offset : Int, value : Value, count : Int) -> Unit raise RuntimeErrorfn array_set(self : MarkSweepHeap, array_idx : Int, elem_idx : Int, value : Value) -> Unit raise RuntimeErrorfn struct_set(self : MarkSweepHeap, struct_idx : Int, field_idx : Int, value : Value) -> Unit raise RuntimeErrorimpl GcManager for MarkSweepHeapfn alloc_array(self : MarkSweepHeap, type_idx : Int, elements : Array[Value]) -> Int raise RuntimeErrorfn alloc_struct(self : MarkSweepHeap, type_idx : Int, fields : Array[Value]) -> Int raise RuntimeErrorfn array_copy(self : MarkSweepHeap, dst_idx : Int, dst_offset : Int, src_idx : Int, src_offset : Int, count : Int) -> Unit raise RuntimeErrorfn array_fill(self : MarkSweepHeap, array_idx : Int, offset : Int, value : Value, count : Int) -> Unit raise RuntimeErrorfn array_set(self : MarkSweepHeap, array_idx : Int, elem_idx : Int, value : Value) -> Unit raise RuntimeErrorfn struct_set(self : MarkSweepHeap, struct_idx : Int, field_idx : Int, value : Value) -> Unit raise RuntimeErrorfn write_barrier(_self : MarkSweepHeap, _obj_idx : Int, _old_value : Value, _new_value : Value) -> Unitimpl GcRuntime for MarkSweepHeapfn write_barrier_pre(_self : MarkSweepHeap, _obj_idx : Int, _old_value : Value, _new_value : Value) -> Unitfn MarkSweepHeap::alloc_array(self : MarkSweepHeap, type_idx : Int, elements : Array[Value]) -> Int raise RuntimeErrorfn MarkSweepHeap::alloc_struct(self : MarkSweepHeap, type_idx : Int, fields : Array[Value]) -> Int raise RuntimeErrorfn MarkSweepHeap::array_copy(self : MarkSweepHeap, dst_idx : Int, dst_offset : Int, src_idx : Int, src_offset : Int, count : Int) -> Unit raise RuntimeErrorfn MarkSweepHeap::array_fill(self : MarkSweepHeap, array_idx : Int, offset : Int, value : Value, count : Int) -> Unit raise RuntimeErrorfn MarkSweepHeap::array_get(self : MarkSweepHeap, array_idx : Int, elem_idx : Int) -> Value raise RuntimeErrorfn MarkSweepHeap::array_set(self : MarkSweepHeap, array_idx : Int, elem_idx : Int, value : Value) -> Unit raise RuntimeErrorfn MarkSweepHeap::struct_get(self : MarkSweepHeap, struct_idx : Int, field_idx : Int) -> Value raise RuntimeErrorfn MarkSweepHeap::struct_set(self : MarkSweepHeap, struct_idx : Int, field_idx : Int, value : Value) -> Unit raise RuntimeErrorfn MarkSweepHeap::with_threshold(threshold : Int, resource_budget? : ResourceBudget?) -> MarkSweepHeapfn MarkSweepHeap::write_barrier(_self : MarkSweepHeap, _obj_idx : Int, _old_value : Value, _new_value : Value) -> Unitfn MarkSweepHeap::write_barrier_post(_self : MarkSweepHeap, _obj_idx : Int, _new_value : Value) -> Unitfn MarkSweepHeap::write_barrier_pre(_self : MarkSweepHeap, _obj_idx : Int, _old_value : Value, _new_value : Value) -> Unitfn Memory::Memory(min : Int, max : Int?, is_memory64? : Bool, is_shared? : Bool, page_size_log2? : Int, resource_budget? : ResourceBudget?) -> Memory raise RuntimeErrorfn Memory::atomic_compare_exchange(self : Memory, offset : Int64, width : Int, expected : Int64, replacement : Int64) -> Int64 raise RuntimeErrorfn Memory::atomic_rmw(self : Memory, operation : AtomicRmwOp, offset : Int64, width : Int, value : Int64) -> Int64 raise RuntimeErrorfn Memory::atomic_store(self : Memory, offset : Int64, width : Int, value : Int64) -> Unit raise RuntimeErrorfn Memory::atomic_wait_begin(self : Memory, offset : Int64, width : Int, expected : Int64, timeout : Int64) -> NativeAtomicWait raise RuntimeErrorfn Memory::copy_at(self : Memory, destination : Int64, source : Int64, length : Int64) -> Unit raise RuntimeErrorfn Memory::copy_from(self : Memory, destination : Int64, source : Memory, source_offset : Int64, length : Int64) -> Unit raise RuntimeErrorfn Memory::fill_at(self : Memory, destination : Int64, value : Byte, length : Int64) -> Unit raise RuntimeErrorfn Memory::from_type(ty : MemoryType, resource_budget? : ResourceBudget?) -> Memory raise RuntimeErrorfn Memory::init_data_at(self : Memory, destination : Int64, data : Bytes) -> Unit raise RuntimeErrorfn Memory::new_guarded_memory0(min : Int, max : Int?, is_shared? : Bool) -> Memory raise RuntimeErrorpub struct ModuleInstance {
types : ReadOnlyArray[SubType]
type_rec_groups : ReadOnlyArray[Int]
canonical_type_indices : ReadOnlyArray[Int]
func_addrs : ReadOnlyArray[Int]
func_type_indices : ReadOnlyArray[Int]
table_addrs : ReadOnlyArray[Int]
mem_addrs : ReadOnlyArray[Int]
global_addrs : ReadOnlyArray[Int]
tag_addrs : ReadOnlyArray[Int]
exports : ReadOnlyArray[Export]
elem_segments : ReadOnlyArray[Element]
data_segments : ReadOnlyArray[Data]
// private fields
} derive(Debug)impl Show for ModuleInstancefn[T : SegmentDropBinding] ModuleInstance::bind_native_segments(self : ModuleInstance, context : T) -> Unitfn ModuleInstance::element_value(self : ModuleInstance, segment : Int, index : Int) -> Value raise RuntimeErrorfn ModuleInstance::element_values(self : ModuleInstance, index : Int) -> ReadOnlyArray[Value] raise RuntimeErrorpub(all) struct NativeGlobalBinding {
address : Int64
root : () -> Value
read : () -> Value raise RuntimeError
write : (Value) -> Unit raise RuntimeError
release : () -> Unit
}impl Debug for NativeGlobalBindingfn ResourceBudget::new(compilation_depth? : Int, memory_bytes? : Int64, table_elements? : Int64, gc_bytes? : Int64, gc_objects? : Int64, instances? : Int64, code_bytes? : Int64, pending_work? : Int64, input_bytes? : Int64, compilation_units? : Int64) -> ResourceBudget raise RuntimeErrorfn ResourceBudget::reserve(self : ResourceBudget, kind : ResourceKind, amount : Int64) -> ResourceLease raise RuntimeErrortype RollbackRegistrarpub struct RootedValue {
// private fields
}pub struct RuntimeCapabilities {
version : String
interpreter : Bool
jit : Bool
simd : Bool
relaxed_simd : Bool
reference_types : Bool
function_references : Bool
tail_call : Bool
exception_handling : Bool
gc : Bool
memory64 : Bool
multi_memory : Bool
component_model : Bool
wasi_preview1 : Bool
threads : Bool
}pub struct RuntimeErrorContext {
error : RuntimeError
call_stack : Array[CallStackEntry]
instruction : String?
func_idx : Int?
}impl Show for RuntimeErrorContextfn RuntimeErrorContext::with_call_stack(self : RuntimeErrorContext, stack : Array[CallStackEntry]) -> RuntimeErrorContextfn RuntimeErrorContext::with_instruction(self : RuntimeErrorContext, instr : String) -> RuntimeErrorContextpub(all) enum RuntimeFeature {
Interpreter
JIT
SIMD
RelaxedSIMD
ReferenceTypes
FunctionReferences
TailCall
ExceptionHandling
GC
Memory64
MultiMemory
ComponentModel
WasiPreview1
Threads
}pub struct Store {
nan_canonicalization : Bool
interpreter_limits : InterpreterLimits
resource_budget : ResourceBudget?
native_execution : NativeExecutionState
// private fields
} derive(Debug)fn Store::Store(nan_canonicalization? : Bool, interpreter_limits? : InterpreterLimits, resource_budget? : ResourceBudget?) -> Store raise RuntimeErrorfn Store::alloc_array(self : Store, type_idx : Int, elements : Array[Value], instance? : ModuleInstance) -> Int raise RuntimeErrorfn Store::alloc_array_repeated(self : Store, type_idx : Int, length : Int, value : Value, instance? : ModuleInstance) -> Int raise RuntimeErrorfn Store::alloc_func(self : Store, module_ : ValidatedModule, index : Int) -> Int raise RuntimeErrorfn Store::alloc_host_func(self : Store, func : (Array[Value]) -> Array[Value] raise RuntimeError, func_type? : FuncType, type_idx? : Int) -> Int raise RuntimeErrorfn Store::alloc_host_func_with_caller(self : Store, func : (Caller, Array[Value]) -> Array[Value] raise RuntimeError, func_type? : FuncType, type_idx? : Int) -> Int raise RuntimeErrorfn Store::alloc_struct(self : Store, type_idx : Int, fields : Array[Value], instance? : ModuleInstance) -> Int raise RuntimeErrorfn Store::array_copy(self : Store, dst_idx : Int, dst_offset : Int, src_idx : Int, src_offset : Int, count : Int) -> Unit raise RuntimeErrorfn Store::array_fill(self : Store, array_idx : Int, offset : Int, value : Value, count : Int) -> Unit raise RuntimeErrorfn Store::array_set(self : Store, array_idx : Int, elem_idx : Int, value : Value) -> Unit raise RuntimeErrorfn Store::borrow_typed_rooted_value(self : Store, value : RootedValue, instance : ModuleInstance, expected : ValueType) -> Value raise RuntimeErrorfn Store::check_instance_admission(self : Store, admission : InstanceAdmission, validated? : ValidatedModule) -> Unit raise RuntimeErrorfn Store::func_type_is_subtype(self : Store, address : Int, instance : ModuleInstance, expected : Int) -> Boolfn Store::gc_type_is_subtype(self : Store, reference : Int, instance : ModuleInstance, expected : Int) -> Boolfn Store::host_exports(self : Store, exports : ArrayView[(String, ExternVal)]) -> ModuleInstance raise RuntimeErrorfn[T, E : Error] Store::in_execution_scope(self : Store, captured : ExecutionScope?, run : () -> T raise E) -> T raise Efn Store::new_instance(self : Store, validated : ValidatedModule, func_addrs~ : ArrayView[Int], table_addrs~ : ArrayView[Int], mem_addrs~ : ArrayView[Int], global_addrs~ : ArrayView[Int], tag_addrs~ : ArrayView[Int], elem_values~ : Array[Array[Value]], admission? : InstanceAdmission) -> ModuleInstance raise RuntimeErrorfn Store::put_guest_continuation(self : Store, body : GuestContinuationBody) -> Int64 raise RuntimeErrorfn Store::register_instance(self : Store, instance : ModuleInstance, admission? : InstanceAdmission) -> Int raise RuntimeErrorfn Store::register_jit_funcrefs(self : Store, entries : Array[StoreFuncrefEntry], release_owner? : () -> Unit) -> StoreFuncrefRegistrationfn Store::register_suspended_execution(self : Store, cancel : () -> Unit) -> Int64 raise RuntimeErrorfn Store::reserve_gc_array_work(self : Store, length : Int) -> (ResourceLease, ResourceLease)? raise RuntimeErrorfn Store::reserve_retained_resource(self : Store, kind : ResourceKind, amount : Int64) -> Unit raise RuntimeErrorfn Store::root_result_value(self : Store, instance : ModuleInstance, value : Value, type_ : ValueType) -> RootedValue raise RuntimeErrorfn Store::struct_set(self : Store, struct_idx : Int, field_idx : Int, value : Value) -> Unit raise RuntimeErrorfn Store::take_guest_continuation(self : Store, handle : Int64) -> GuestContinuationBody raise RuntimeErrorfn Store::with_c_heap(nan_canonicalization? : Bool, interpreter_limits? : InterpreterLimits, resource_budget? : ResourceBudget?) -> Store raise RuntimeErrorpub struct StoreCounts {
funcs : Int
func_types : Int
func_type_indices : Int
tables : Int
mems : Int
globals : Int
tags : Int
tag_type_indices : Int
tag_owners : Int
exns : Int
wrapped_externs : Int
func_owners : Int
instances : Int
jit_tables : Int
heap_slots : Int
heap_live : Int
wrapped_extern_capacity : Int
} derive(Debug)type StoreFuncrefRegistrationpub struct StoreIdentity {
// private fields
}impl Show for StructInstancefn Table::Table(elem_type : ValueType, min : Int, max : Int?, init_value? : Value, is_table64? : Bool, resource_budget? : ResourceBudget?) -> Table raise RuntimeErrorfn Table::copy_from(self : Table, dest : Int, src_table : Table, src : Int, n : Int) -> Unit raise RuntimeErrorfn Table::copy_from_at(self : Table, dest : Int64, src_table : Table, src : Int64, n : Int64) -> Unit raise RuntimeErrorfn Table::from_type(ty : TableType, init_value? : Value, resource_budget? : ResourceBudget?) -> Table raise RuntimeErrorInstall
Download zipShared Wasmoon interpreter state and target-specific storage primitives
Dependencies