malfunction
malfunction copied to clipboard
Support for FFI
Support for FFI would be nice.
Has ffi been implemented yet? If a language like idris2 compiles to malfunction, can it interact with c or ocaml functions?
You can use (global $Module $function) to access the OCaml value Module.function. See examples/helloworld.mlf for an example. There are no current plans to expose a direct C FFI (it's fiddly), so for C FFI you'll need to write an OCaml wrapper and link against that.