LWIS is a spin-off project. It stands for Library Wrappers in Scheme.


  • written in Scheme, configured in Scheme
  • generates wrappers for libraries for multiple environments

    • Python, Perl, Guile, JNI, Ruby
  • support for mapping GLib types to language-specific types

    • GHashTable to a Python map interface
    • GList to a Python list or a Scheme list
  • support for structure-based pseudo-classes and inheritence
  • support for GObject (compatible with py-gobject if I can help it)


I've got Python generation of a module and module methods, but haven't begun working on type wrappers yet. An example definition for a module:

Given a functure declaration such as:
int my_add_eight(int a, char *b);
You could generate a lwis function wrapper as:
(define my-add-eight
  (let ((a (lwis-var-new int "a"))
        (b (lwis-var-new char* "b")))
     "" int "my_add_eight" `(,a ,b))))
Then add it to a module definition:
(lwis-module-add-function my-module my-add-eight)
Favorite Categories