[plt-scheme] MzScheme + SWIG: howto?

From: Eli Barzilay (eli at barzilay.org)
Date: Fri Jun 26 10:34:30 EDT 2009

On Jun 26, Neil Van Dyke wrote:
> Eli Barzilay wrote at 06/26/2009 10:14 AM:
> > IIRC, the SWIG interface is still doing C extensions, which should be
> > compiled with mzc.  It would be really easy to adapt the mzscheme
> > backend of SWIG to generate `scheme/foreign' but nobody did it.
> 
> I've lost interest in SWIG.

(Me too, of course...)


> The FFI is so much easier to use than C extensions that there is now
> much less need for SWIG as a high-level source language.
> 
> I am guessing that the main reason someone might still want to use
> SWIG is if they wanted to produce a big pile of library bindings
> (using existing SWIG specs for the libraries) and didn't care how
> polished the bindings were.

Yes, the specification part is way better in Scheme, for the obvious
reasons, but one thing that SWIG is doing is parse C header files.

(I'm planning to do something about getting the C information into
Scheme code automatically using macros that will invoke GCC on a
generated file that provides the information -- a generalized way of
doing what the sgl code is doing now.)

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!


Posted on the users mailing list.