This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

G-Wrap 0.3


Hi -- 

With all the suggestions I have gotten recently, I have made a major
overhaul of G-Wrap, from version 0.2 to version 0.3 (sorry it has
taken so long).  The end of the README file at the end of this message
lists the major changes.

I hope no one minds the severity of the changes to the interface.  I
am under the impression that few-enough people are using the system so
far that the total pain from updating G-Wrap interface code will be
small.  From the feedback I have gotten, I am also under the
impression that people who use the system so far are willing to adapt
to a better interface (or maybe I have only heard from those who
didn't like the previous one :).

The documentation and distribution are available from
 http://www.cs.cmu.edu/~chrislee/g-wrap/

Feedback, and especially bug-reports and fixes, are very welcome.

 -Chris

ps. The internal documentation facility, *gw:descriptions*, is not
    working perfectly at the moment and I think it has to do with the
    module system.  For loadable modules, anyway, only the functions
    from the last module loaded seem to be documented.

Here is the README file:
*************************************************************************

G-Wrap -- A tool for exporting C libraries into Guile
=====================================================

This is a tool for specifying types, functions, and constants to
import into a Scheme interpreter, and for generating code (in C) to
interface these to the Guile interpreter in particular.

Read the manual (doc/g-wrap.texi,
http://www.cs.cmu.edu/afs/cs/usr/chrislee/www/g-wrap/g-wrap.html,
or http://www.cs.cmu.edu/afs/cs/usr/chrislee/www/g-wrap/g-wrap.ps.gz)
to learn how to use this package.

Installing
==========
Edit the Makefile as it directs and do "make" then "make install".  If
you know about how to set up automatic configuration, feel free to
show me how and/or send patches -- I haven't done this yet.

Contents
=========
COPYING		 - Describes the terms under which you may redistribute
		   G-Wrap, and explains that there is no warranty.
g-wrap-fns.c	 - Functions needed for Guile implementation of type extensions
g-wrap.h	 - Header for g-wrap.h
g-wrap.scm	 - Guile implementation of G-Wrap
guile-types.scm	 - Types currently implemented for G-Wrap's Guile support
output-file.scm	 - Utilities for generating an output file (used by g-wrap.scm)
doc/example-g-wrap.scm - Example code from the user manual
doc/g-wrap.texi	 - The user manual
g-wrap-guile     - a script for building Guile glue from a specification file

Author
======
 Christopher Lee (chrislee@ri.cmu.edu)

Newly added in version 0.3:
======================================================================
 - A capability for generating dynamically-linkable Guile modules
 - Automatic support for exporting functions with more than 10 arguments,
    without modification of libguile.
 - No longer relies on Slib (slib dependencies removed from output-file.scm,
    and g-wrap.scm)
 - Made generated *.h files more C++ friendly
 - New options for wrapping structures which are passed by value
   rather than by reference, and for generating C++ code.
 - new-function: New interface, automatically adds description to an
   assq list in variable "*gw:descriptions*", complete with a
   prototype and list of parameter and return types.
 - Renamed many functions -- the interface is pretty new overall.
  + define-constant     --> new-constant
  + c-file-include-local-header  --> gwrap-c-include-local-header
  + c-file-include-global-header --> gwrap-c-include-global-header
  + open-c-file		--> gwrap-c-open-file
  + output-c		--> gwrap-c-output-c
  + output-h		--> gwrap-c-output-h
  + make-wrapper-c-type --> gwrap-c-assume-types-wrapped (simpler interface)
 - Code for generating Guile wrapper code is now a Guile module
 - g-wrap-guile is now written to use Guile interpreter rather than SCM
 - types are now given symbolic keys rather than being returned in
   structures
   + new function formats:
    (add-type scheme-sym c-type-str fn-to-scm fn-from-scm fn-isa)
    (add-new-type scheme-sym the-type)
    (new-type scheme-sym c-name c-print-name c-die-name c-eq-name . options)
     + If options contains (c-gc-name "fname"), fname is called for
        protecting objects from GC
     + If options contains (pass-c-ptr? #f), type is passed as struct
       rather than pointer to struct
 - gwrap-c-open-file:
   Accepts options telling it to generate a C++ file and/or code for a
   dynamically linkable module