[plt-scheme] Re: stand-alone app

From: Jefferson Provost (jp at cs.utexas.edu)
Date: Wed Sep 25 21:31:38 EDT 2002

Ryan Culpepper wrote:
> --- Jefferson Provost <jp at cs.utexas.edu> wrote:
> 
> Does the cffi module (lib "cffi.ss" "compiler") not do what you want?
> For some of the native code I need to use, I just create wrappers
> using c-lambda (and include the headers using c-declare). Linking
> this against shared libraries is more complicated, but should be
> doable.

I'm not sure.  I've only been testing out the process of building 
applications using a toy application with a couple of foreign functions, 
but ultimately we'll have a lot.  I'm hoping to use SWIG to generate the 
wrappers, to avoid having to write them by hand, if possible.  However, 
the tree.cxx example suggests that I can wrap C++ classes in such a way 
that they become part of the scheme class hierarchy, which is really 
useful, and impossible (I think!) with SWIG.

But if you use cffi to call C functions written in another file (rather 
than in-line C code in the .ss file) and then compile/link with mzc 
don't you still get an extension that has to be loaded with 
load-extension?  Or is it possible to get a module that can be embedded 
with make-embedding-executable this way?

J.



Posted on the users mailing list.