Attribute Macro ocaml_derive::ocaml_func [−][src]
#[ocaml_func]
Expand description
func
is used export Rust functions to OCaml, performing the necessary wrapping/unwrapping
automatically.
- Wraps the function body using
ocaml::body
- Automatic type conversion for arguments/return value (including Result types)
- Defines a bytecode function automatically for functions that take more than 5 arguments. The
bytecode function for
my_func
would bemy_func_bytecode
- Allows for an optional ident argument specifying the name of the
gc
handle parameter