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
RE: [Caml-list] swig like library...
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-04-24 (19:19)
From: art yerkes <ayerkes@s...>
Subject: Re: [Caml-list] swig like library...
On Fri, 23 Apr 2004 08:48:14 -0700

> It attempts to be a more well behaved SWIG.  To my knowledge, I started
> the first attempt at a SWIG library.  I got frustrated with the
> infrastructure and quit.  Since then there have been at least 2 other
> attempts for ocaml swig support and recently I noticed there an official
> "ocaml swig".  Anyway, you can read about my complaints and my
> alternatives.

I chose to throw in with the SWIG project mainly because I had a C++
component library and no way of automatically wrapping it (About 200
classes, 800 methods).  I did not want to produce another wrapper
generator that takes a non-C++ input, nor do the wrapping by hand.

SWIG does have infrastructure problems.  It's really meant for generating
wrappers for typeless languages.  My first attempt at the SWIG module was
not general enough, which is why I took the approach of making the SWIG
output treat ocaml as a scripting language, too.  As far as I know, it's
the only project out there with as well developed a C++ reader (It
processes most C++ headers unmodified), and I'd recommend using it's s-exp
or xml output as a foundation for further work on wrapping, even if you
use nothing else from it.  That part has been tuned through experience,
and lots of the decisions that need to be taken are not covered by the C++

If others are interested in the module, I'm always willing to listen to
suggestions and take patches.
Hey, Adam Smith, keep your invisible hands to yourself!

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: