Version 1 (modified by coke, 5 years ago)

copy from  http://www.perlfoundation.org/parrot/index.cgi?cffi

"SWIG"< http://www.swig.org> is a code generator that generates inferfaces of C and C++ libraries for use by various languages.

Parrot NCI can access C-libraries without the help of a compiler, but still a little bit of code has to be written. SWIG can help with that task.

Implementation should be fairly easy. As a starting point one can take the "cffi"< http://www.swig.org/Doc1.3/Lisp.html#Lisp_nn3> backend of SWIG. *cffi* is the "Common Foreign Function Interface"< http://common-lisp.net/project/cffi/> of CommonLisp.

Another possibility is to teach Parrot about the *cffi*. Parrot just needs to understand the files generated by e.g. the cffi backend of SWIG. Parrot doesn't have to use a lisp implementation nor needs to know how Lisp implementations do foreign function calls.

See also "Design Issues for Foreign Function Interfaces"< http://autocad.xarch.at/lisp/ffis.html>.