futhark-data-sml [](https://github.com/diku-dk/futhark-data-sml/actions)

June 23, 2021 ยท View on GitHub

A Standard ML implementation of the Futhark binary data format, which is used by Futhark tooling, most importantly as the data interchange format of the server protocol.

Overview of MLB files

Use of the package

This library is set up to work well with the SML package manager smlpkg. To use the package, in the root of your project directory, execute the command:

$ smlpkg add github.com/diku-dk/futhark-data-sml

This command will add a requirement (a line) to the sml.pkg file in your project directory (and create the file, if there is no file sml.pkg already).

To download the library into the directory lib/github.com/diku-dk/futhark-data-sml, execute the command:

$ smlpkg sync

You can now reference the mlb-file using relative paths from within your project's mlb-files.

Notice that you can choose either to treat the downloaded package as part of your own project sources (vendoring) or you can add the sml.pkg file to your project sources and make the smlpkg sync command part of your build process.

See also this very simple example program.

Compatibility

Tested with MLton and MLKit. Should in principle work with any SML implementation that supports a reasonable subset of the Basis library (e.g. SML/NJ), but you may need to manually load the files if they don't support MLB.