Attribute Macro ocaml::native_func

source · []
#[native_func]
Expand description

native_func is used export Rust functions to OCaml, it has much lower overhead than func and expects all arguments and return type to to be Value.

  • Wraps the function body using ocaml::body
  • Allows for an optional ident argument specifying the name of the gc handle parameter