[Haskell-cafe] Announce: Yet Another Tool to Generate FFI Bindings: hsffig

Dimitry Golubovsky dimitry at golubovsky.org
Sat Jun 25 03:39:42 EDT 2005

I am pleased to announce the very first alpha release of the (yet 
another) FFI binding autogeneration tool.

Some time ago, I asked the list subscribers about available bindings to 
Berkeley DB. Several people kindly shared their code with me.

One thing I noticed in all bindings: they required manually-written 
wrappers to accomodate for Berkeley DB indirect style of calling functions.

Considering large number of such functions in BDB, I attempted to write 
a tool which would automatically parse the BDB include file, and extract 
function prototypes to generate FFI declarations. Soon it became clear 
that an almost full C syntax parser would be necessary.

Finally it resulted in what I am presenting to the Haskell community 
with hope that this utility will be useful to many developers.

Of course there are many omissions and shortcuts, but before I move 
forward, I would like to get some feedback from potential users of this 

There is no detailed documentation. I have written a brief README file. 
More detailed documentation will follow.

I haven't created a homepage for this project yet: the only way to get 
it so far is the darcs repo:

darcs get http://www.golubovsky.org/repos/hsffig

Files in the repository may be browsed at:


I will appreciate any feedback.

Dimitry Golubovsky
Middletown, CT

More information about the Haskell-Cafe mailing list