Skip to contents

Create a Wasmer host function from an R function with dynamic signature.

Usage

wasmer_function_new_ext(ptr, rfun, arg_types, ret_types, `_name`)

Arguments

ptr

External pointer to WasmerRuntime.

rfun

R function object.

arg_types

Character vector of argument types (e.g. c("i32", "f64")).

ret_types

Character vector of return types (e.g. c("i32")).

_name

Character string for registry name.

Value

External pointer to Function

Details

Create a Wasmer host function from an R function with dynamic signature

Examples

if (FALSE) { # \dontrun{
wasmer_function_new_ext(ptr, function(x) x, c("i32"), c("i32"), "myfun")
} # }