Import Upstream version 20180207
[hcoop/debian/mlton.git] / doc / guide / src / ForeignFunctionInterface.adoc
CommitLineData
7f918cf1
CE
1ForeignFunctionInterface
2========================
3
4MLton's foreign function interface (FFI) extends Standard ML and makes
5it easy to take the address of C global objects, access C global
6variables, call from SML to C, and call from C to SML. MLton also
7provides <:MLNLFFI:ML-NLFFI>, which is a higher-level FFI for calling
8C functions and manipulating C data from SML.
9
10== Overview ==
11* <:ForeignFunctionInterfaceTypes:Foreign Function Interface Types>
12* <:ForeignFunctionInterfaceSyntax:Foreign Function Interface Syntax>
13
14== Importing Code into SML ==
15* <:CallingFromSMLToC:Calling From SML To C>
16* <:CallingFromSMLToCFunctionPointer:Calling From SML To C Function Pointer>
17
18== Exporting Code from SML ==
19* <:CallingFromCToSML:Calling From C To SML>
20
21== Building System Libraries ==
22* <:LibrarySupport:Library Support>