heap2exec
heap2exec is a simple utility for building stand-alone executables from SML/NJ heap images.
heap2exec wraps the binary smlnj runtime image and an smlnj heap image into one executable image.
heap2exec is a shell script that makes use of the heap2asm tool. The heap2asm tool is installed in the smlnj bin directory when running config/install.sh if heap2asm is specified in config/targets. heap2asm is not installed by default because it only works for ppc-unix (Mac OS X) and x86-unix (Mac OS X, linux, etc.)
The source code for heap2asm is in the file heap2asm.tgz in the release distributions.
Directions
Given an heap image, say foo.ppc-unix, produced by either SMLofNJ.exportFn or SMLofNJ.exportML or by the ml-build command (see CM manual), runningheap2exec foo.ppc-unix foowill produce an executable file foo.Currently heap2exec is supported on ppc-unix (Mac OS X), and x86-unix.