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

Browse thread
Camouflage 1.0
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 1997-01-23 (13:11)
From: Robbert VanRenesse <rvr@c...>
Subject: Camouflage 1.0
Announcing Camouflage 1.0.

Camouflage 1.0 is a tool that supports interfacing between C and OCaml.
Camouflage reads a .mli file and creates the necessary C interfaces to
the given module.  This way the fact that a library is written in OCaml
can be ``camouflaged.''  Camouflage also supports creating OCaml interfaces
to C functions (``OCamlflaging'' a C library that way :-), and generates
functions that convert between OCaml and C data structures.

For example, let say "x.mli" contains the declaration "val add: int ->
int -> int".  Then the command "camou x.mli" creates a file "x.c" that
contains the C function "int X_add(int, int)" which does all the stuff
necessary to invoke the ML function.  Vice versa, the declaration
"external add: int -> int -> int" creates an ML function to invoke
a corresponding C function.

The current distribution (usable from Unix or Windows) may be obtained
by ftp from

Bugs reports may be sent to me.  Here's one bug:  when invoking a
C function from OCaml in interpreted mode, you can use only 5 parameters
or less.  Easy to fix, but I haven't done it yet...