Erlang module for SWIG?
Mon Oct 27 20:51:33 CET 2003
while SWIG has its own interest, perhaps you might find the route
useful that Daan Leijen has chosen for creating the Haskell binding
"Since the core interface is generated automatically from the
wxEiffel binding, about 75% of the wxWindows functionality is
already supported, excluding the more "exotic" widgets like
dockable windows and the openGL canvas. .."
wxcore [documentation]. The Haskell binding to the core wxWindows
library. This is just like programming the wxWindows library
directly, you can see some examples in the cvs. All the method
definitions and marshaling code is generated automatically -- about
500 classes with 2500 methods and 1000 constant definitions. wxcore
uses the following two sub-projects:
wxc. A C project that puts a C wrapper around the C++ interface to
wxWindows. This makes it much easier to access the wxWindows library
from Haskell. The C wrapper consists of the C sources of the Eiffel
ewxw library for wxWindows. We also added a few files to make the
project suitable for Haskell, but we made no changes to the original
Eiffel sources. This way, we are able to automatically update the
sources from their cvs server. A big thank-you to the people that
worked on the Eiffel library!
wxdirect. A Haskell program that reads the C header files of the
wxWindows C library and automatically generates Haskell marshaling
code and class definitions."
Erlang and Haskell FFIs differ, and I don't know the details of
this, but perhaps you find useful info there..
> Has anyone ever attempted to create an Erlang module for SWIG?
> (http://www.swig.org) If so, I'm curious about what sort of roadblocks are
> in the way of doing a proper implementation.
> Specifically, I'm trying to create an Erlang interface to wxWindows.
> (http://www.wxwindows.org) After having made a couple of different stabs
> at it, I'm considering using SWIG to help automate the process a little
> more. However, if there are serious problems with SWIGing Erlang, I may
> just persevere down my current path instead.
> - Michael Hobbs
More information about the erlang-questions