Skip to content

Loading…

New comment on block [block-idp11457952] #1574

Closed
Leonidas-from-XIV opened this Issue · 2 comments

3 participants

@Leonidas-from-XIV

Are there plans on adding information on the FFI that is shipped with OCaml itself? Considering many extensions use it and it is only documented in the manual in a rather complex way and in Florent Monnier's documentation but not completely correct and understandable it might be useful to include some documentation here as well.

@bactrian

This comment references this from milestone beta1: http://www.realworldocaml.org/beta1/en/html/foreign-function-interface.html#idp11457952

Context:

The simplest foreign function interface in OCaml doesn't even require you to write any C code at all! The Ctypes library lets you define the C interface in pure OCaml, and the library then takes care of loading the C symbols and invoking the foreign function call.
@avsm
Owner

Not in the printed book, since a full explanation is both very long and also prone to change (whereas ctypes is more portable). However, see #1701 for upcoming fixes.

@avsm avsm closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.