Verrazano
A Bridge Between C++ and Lisp
OBSOLETE
cl-autowrap (and c2ffi that it uses) is a much better version of the same basic idea. The authors suggest to use cl-autowrap instead of Verrazano.
Introduction
Verrazano is a bindings generator targetting Common Lisp. It is designed to have robust support for C and C++ header files, by using GCC-XML as its parser, and to be easily retargettable to a number of different foreign function interfaces. Currently, Verrazano is in development as part of the Google Summer of Code (SoC).
For those of you who came here looking for Fetter, well, you've found it! My Google SoC mentor, Mr. Kenny Tilton, felt that a name that evoked images of incarceration was perhaps too unmarketable :)
Getting Started
News & Updates
- September 27, 2005: Modified the macro processing code to operate on the XML tree instead of the completed IR. The main result, aside from cleaner code, is that the declaration-pruning pass that gets run on the IR will strip unnecessary macro definitions as well. Updated the roadmap to show where things are going with the project. Consider the roadmap log-scaled spanning the next month or so.
- September 19, 2005: Added support for arrays in structures. Added tests for OpenGL, FTGL, and POSIX. Libraries known to work with Verrazano include: Cairo, FLTK 1.x, FTGL, libldap, OpenAL, OpenGL, and libc. Several limitations still exist that affect the workings of FLTK, and any library that relies on bitfields in structures. The former limitation will be lifted when C++ support is completed, while the latter will be lifted when bitfields are supported in C-FFI.
- September 16, 2005: Added support for exporting all symbols in a binding automatically. Also added a pass to prune unreferenced XML nodes before conversion to IR. Since the simplifier is the biggest CPU-hog in the program, that should speed up generation of any binding that results in the inclusion of large system headers. Also fixed a couple of bugs, one relating to unnamed IR elements, another relating to the mistranslation of the "long long" type.
- September 5, 2005: Added support for reading preprocessor macros and attempting to generate reasonable declarations for them. The current implementation handles #define constants, which is the most common usage for preprocessor macros.
- September 4, 2005: Fixed several portability issues that made life difficult on Windows. Added some sample code showing how binding files can be changed to accomodate the build system being used on the host machine.
- September 2, 2005: I've posted a document in the downloads section detailing the current status of Verrazano along with its future goals. It should be a good way to get an idea of what's happening with the project.
- Septemer 2, 2005: Initial C++ support is in CVS, along with a couple of new test apps. One of the test apps uses a Verrazano-generated FLTK binding to show-off the C++ support. The test app is really sparse right now, but I'll add to it over the next few days to make something prettier.
- August 15, 2005: Revised the Cairo demo, and posted some captures of the output for those who cannot run Verrazano right now. Check the downloads section!
- August 14, 2005: A C-FFI backend is in CVS, along with a demo application using Cairo and its PDF backend. The demo application is a Lisp port of the pdf-surface.c test that comes with Cairo 0.60. You can build and run the test by cd'ing into the 'verrazano' main directory, and typing "sbcl --load testsuite/cairo/generate.lisp ; sbcl --load testsuite/cairo/test.lisp".
Projet Status
The following is a roadmap of the short-term technical goals of the project, in descending-priority order. Any input that would help in assigning appropriate priorities is welcome on the mailing list.
- Restructure the Lisp packages to seperate the CFFI backend from the frontend.
- Define a compiler-ABI plugin interface suitable for all v-table oriented compilers.
- Use the new interface to implement an ABI plugin for Visual C++ (COM).
- Add support for overriding virtual methods in C++ classes.
- Package and ship the first official release; market appropriately.
- Better-integrate C++ code with Lisp code, in particular CLOS.
Mailing Lists
- fetter-devel - Discussion regarding Verrazano or its design.
Downloads
Source Code Access
You can browse the repository or check out with
darcs get --partial http://common-lisp.net/project/fetter/darcs/verrazano/