Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

The Caml Hump: Languages interfaces

Toys - Examples
An example of OCaml/Fortran interface [10-Aug-2001, Development code]
Native OCaml libraries
CamlIDL [10-Aug-2001, version 1.04, Stable] Has a documentation
CamlIDL is a stub code generator and COM binding for Objective Caml.
Author: Xavier Leroy.
Development tools
CamlJava [18-Feb-2002, version 0.2, Alpha]
This is a very preliminary release of CamlJava, an OCaml/Java interface. Currently, it provides a low-level, weakly-typed OCaml interface very similar to the JNI.
Author: Xavier Leroy.
Development tools
Cigen [10-Aug-2001, Development code]
Generation of stubs for Caml-to-C interface based on a .h header file (work in progress, not yet complete).
Author: Gerd Stolpmann.
Applications written in Caml
Confluence [25-Mar-2004, version 0.9, Beta] Has a documentationHas a tutorial
A powerful logic design language that combines the dataflow and component-based methodologies of HDL with the expressiveness of modern functional programming.
Author: Tom Hawkins.
Development tools
FFI [16-Aug-2001, version 1.2.2, Stable]
A foreign function interface package for Objective CAML. It reads C header files and generates a mix of C code and ocaml external declarations.
Author: David Fox.
Development tools
Forklift [26-Aug-2003, version pre-alpha, Development code]
A program for generating language bindings based on C header files.
Author: Jeff Henrikson.
Mixing OCaml and C [30-Apr-2008, Stable]
This tutorial explains how to mix OCaml and C code (function calls, data types, finalisation, compilation with a C library).
Author: Florent Monnier.
Development tools
O'Jacare [01-Jun-2004, Beta] Has a documentation
O'Jacare is a code generator to help in interoperability between Java and O'Caml through their object model. O'Jacare defines a simple IDL for Java's classes and interfaces descriptions. For communications from Java to O'Caml it owns a callback mechanism. So, you can easily override in O'Caml a method defined in Java. The implementation is based an each language low-level interfaces with C (JNI for Java and external for O'Caml) and uses an extended version of the camljava library. O'Jacare generates all needed wrapper classes and enables static typechecking in both world.
perl4caml [01-Apr-2005, version 0.9.3, Beta]
Interface for calling Perl code from OCaml.
Bindings with C libraries
Pycaml [29-May-2002, Beta] Has a documentation
A system for binding OCaml code with python.
Author: Art Yerkes.
Native OCaml libraries
Pycaml (2) [10-Oct-2011, version 2011-10-05, Alpha]
OCaml/Python interface.
Development tools
Saffire [31-May-2005, Alpha] Has a documentation
Saffire is a static analysis program that detects bugs in programs that use the OCaml/C foreign function interface. Saffire works by performing type inference across both OCaml and C to make sure that values are used consistently across the language boundary. For instance, if a OCaml passes a record to a C function, that C function should not treat the data as an integer. Saffire also tracks what C variables point into the OCaml heap and ensure they are always registered with CAMLparam/local before any allocation functions are called.
Author: Michael Furr.
Development tools
SWIG [05-Dec-2003, version 1.3.20, Stable] Has a documentation
SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages. SWIG is primarily used with common scripting languages such as Perl, Python, Tcl/Tk, and Ruby, however the list of supported languages also includes non-scripting languages such as Java, OCAML and C#.