Interface PanamaHostFunction.HostFunctionCallback

Enclosing class:
PanamaHostFunction
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface PanamaHostFunction.HostFunctionCallback
Functional interface for host function implementations.

Host functions implement this interface to provide custom logic that can be called from WebAssembly modules. The interface uses WasmValue arrays for type-safe parameter passing.

Since:
1.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    ai.tegmentum.wasmtime4j.WasmValue[]
    execute(ai.tegmentum.wasmtime4j.WasmValue[] params)
    Executes the host function with the given parameters.
  • Method Details

    • execute

      ai.tegmentum.wasmtime4j.WasmValue[] execute(ai.tegmentum.wasmtime4j.WasmValue[] params) throws ai.tegmentum.wasmtime4j.exception.WasmException
      Executes the host function with the given parameters.
      Parameters:
      params - the parameters passed from WebAssembly
      Returns:
      the results to return to WebAssembly
      Throws:
      ai.tegmentum.wasmtime4j.exception.WasmException - if the function execution fails