| 1 | "SWIG"<http://www.swig.org> is a code generator that generates inferfaces of C and C++ libraries for use by various languages. |
| 2 | |
| 3 | Parrot NCI can access C-libraries without the help of a compiler, but still a little bit of code has to |
| 4 | be written. SWIG can help with that task. |
| 5 | |
| 6 | 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. |
| 7 | *cffi* is the "Common Foreign Function Interface"<http://common-lisp.net/project/cffi/> of CommonLisp. |
| 8 | |
| 9 | Another possibility is to teach Parrot about the *cffi*. Parrot just needs to understand the files |
| 10 | generated by e.g. the cffi backend of SWIG. |
| 11 | Parrot doesn't have to use a lisp implementation nor needs to know how Lisp implementations do |
| 12 | foreign function calls. |
| 13 | |
| 14 | See also "Design Issues for Foreign Function Interfaces"<http://autocad.xarch.at/lisp/ffis.html>. |