MLNLFFI - MLton Standard ML Compiler (SML Compiler)

MLton MLTONWIKIVERSION | MLNLFFI |
Home Index

ML-NLFFI is the no-longer-foreign-function interface library for SML.

As of 20050212, MLton has an initial port of ML-NLFFI from SML/NJ to MLton. All of the ML-NLFFI functionality is present.

Additionally, MLton has an initial port of the mlnlffigen tool from SML/NJ to MLton. Due to low-level details, the code generated by SML/NJ's `ml-nlffigen` is not compatible with MLton, and vice-versa. However, the generated code has the same interface, so portable client code can be written. MLton's `mlnlffigen` does not currently support C functions with `struct` or `union` arguments.

## Usage

- You can import the ML-NLFFI Library into an MLB file with

  MLB file | Description
  `$(SML_LIB)/mlnlffi-lib/mlnlffi-lib.mlb` |

- If you are porting a project from SML/NJ's CompilationManager to MLton's ML Basis system using `cm2mlb`, note that the following maps are included by default:

      $c/c.mlb  $(SML_LIB)/mlnlffi-lib/mlnlffi-lib.mlb

  This will automatically convert a `$/c.cm` import in an input `.cm` file into a `$(SML_LIB)/mlnlffi-lib/mlnlffi-lib.mlb` import in the output `.mlb` file.

## Also see

- Blume01

- MLNLFFIImplementation

- MLNLFFIGen

Last edited on 2010-06-07 14:33:26 by MatthewFluet.