MLton’s foreign function interface (FFI) extends Standard ML and makes it easy to take the address of C global objects, access C global variables, call from SML to C, and call from C to SML. MLton also provides ML-NLFFI, which is a higher-level FFI for calling C functions and manipulating C data from SML.

Overview

Importing Code into SML

Exporting Code from SML

Building System Libraries