This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Foreign function interface generators.


Clifford Beshers <beshers@ohanlon.mcl.cs.columbia.edu> writes:

> So, I've decided to stick with g-wrap for the moment, modifying it
> myself if necessary.

I have done that for generating stubs for Gtk (the GIMP toolkit) and I
think it is a viable option.  I started with g-wrap, found it
increasingly inappropriate, and then wrote my own wrapper almost from
scratch.

I don't think that it is such a bad thing to write a custom glue
generator for a particular library.  Of course, we should reuse code
and ideas, but coming up with one wrapper that handles all cases is
impossible I think.  The differences between Scheme and C are too big
to be automated away, I feel.

As Bill pointed out, CORBA (or ILU, ...) could be a useful common
ground but the C library needs to export a CORBA interface in the
first place.  Not all libraries we want to wrap will do that, I'm
afraid.

But, we could try to gather all custom wrapping code into one
program/distribution.

That being said, I think your suggestions are good ones.