HostFunction

HostFunction

interface HostFunction

Base for all host-provided functions exposed to WebAssembly programs via imports.

Fields

Name Description
abstract parameterTypes: List<KClass<Value<*>>>

The classes of the required parameters for the function.

abstract returnType: KClass<ReturnType>?

The class of the ReturnType of this HostFunction.

Methods

invoke

abstract operator fun invoke(params: List<Value<*>>, context: HostFunctionContext): ReturnType

Parameters

Name Description
params: List<Value<*>>
context: HostFunctionContext

ReturnValue

Name Description
ReturnType