Version 1 (modified by coke, 12 years ago)

copy from

"SWIG"<> 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"<> backend of SWIG. *cffi* is the "Common Foreign Function Interface"<> 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"<>.