[fetter-devel] Request for comments on new interface

Rayiner Hashem rayiner at gmail.com
Sat Oct 8 02:33:40 UTC 2005


The user interface for Verrazano is a bit of a kludge at the moment,
and I've been working recently on refactoring the code to both enable
a more sensical and straightforward UI, and also to refactor the
internals to allow better user control in certain places. This work is
a prerequisite for things like Visual C++ support and multiple backend
support. Moreover, I consder a rework of the UI to be a prerequisite
for a 1.0 release.

Right now, what I have is a procedural interface to the generator's
internals. What I need is a good way of allowing the user to specify a
configuration. The idea is to dump the special .binding file, as Kenny
suggested, and go with a set of macros. My first thoughts are to make
generate.lisp look like this:

(verrazano:defbinding cairo
  (:name "cairo-library")
  (:nicknames "cairo")
  (:include "cairo/cairo.h"
            "cairo/cairo-pdf.h"))

(verrazano:defhost winvc++
  (:compiler :vc++)     ; or :g++
  (:gccxml-path "")
  (:gccxml-command "gccxml")
  (:temp-directory "/tmp"))

(verrazano:deftarget cffi-lispy
  (:backend :cffi)
  (:name-style :lisp-style)   ; or :c-style
  (:search-mode :strict))    ; or :helpful (better name???)

(verrazano:create-binding
  :binding cairo
  :host winvc++
  :target cffi-lispy
  "testsuite/cairo/cairo-library.lisp")

Basically, the specification of the configuration is split up into a
binding describing the header files to incorporate, a host describing
the host platform, and a target describing what backend to use and
what code generation options to enable. Common hosts like "winvc++" or
"lingcc" would be built into Verrazano, so you could pass something
like "verrazano:winvc++" to CREATE-BINDING, without having to redefine
it each time.

I'd love to recieve any comments that would help me make this
interface better (or suggest to me to scrap it entirely and do
something else :)

Sincerely,
    Rayiner Hashem



More information about the fetter-devel mailing list