Giraffe Library

Giraffe Library is an SML interface to libraries that support GObject Introspection, such as GLib and GTK. The interface introduces some abstraction to provide expected features of SML such as:

  • automatic memory management (using garbage collection)

  • static type safety

  • portable source code

  • no uninitialized values

See the Available Libraries section in the User Guide for a list of supported libraries.

Notably, Giraffe Library brings the GTK 3 stack to SML, to enable applications with GUIs to be written entirely in SML. For applications without GUIs, Giraffe Library still provides useful features, as the GLib Examples show.

There exist many other useful libraries that support GObject Introspection and an interface to those is easily generated using the Giraffe code generator. To request an interface to another library, please raise an issue.

Giraffe Library depends on the FFI (Foreign Function Interface) of an SML compiler. The following SML compilers are supported:


The latest library release is giraffe-1.0.0-alpha.11.tar.gz.

See the Quick Setup page for brief installation instructions. For more detailed instructions, see the Setup Guide or, if that is unavailable, the README and INSTALL files provided with the release.

For earlier releases and the changes history, see the Releases page.


The library release is published under the Giraffe Library (Run-Time) Licence. This licence is sufficently permissive to allow Giraffe Library to be used in closed-source appliactions. The Giraffe code generator, which is not required by applications that use Giraffe Library, is published under the Giraffe Code Generator Licence.

Contact and support

Please send any queries to the Giraffe User mailing list.