logo
pub trait Engine {
    fn run_func(
        &self,
        func: &Func,
        params: impl IntoIterator<Item = WasmValue>
    ) -> WasmEdgeResult<Vec<WasmValue>>; fn run_func_ref(
        &self,
        func_ref: &FuncRef,
        params: impl IntoIterator<Item = WasmValue>
    ) -> WasmEdgeResult<Vec<WasmValue>>; }
Expand description

The object that is used to perform a host function is required to implement this trait.

Required Methods

Runs a host function instance and returns the results.

Arguments
  • func - The function instance to run.

  • params - The arguments to pass to the function.

Erros

If fail to run the host function, then an error is returned.

Runs a host function instance by calling its reference and returns the results.

Arguments
  • func_ref - A reference to the target host function instance.

  • params - The arguments to pass to the function.

Erros

If fail to run the host function, then an error is returned.

Implementors