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