Bindings/wrapper: how to?

Any tips or resources for creating a wrapper or bindings in Ruby to
an existing C library?
How does one go about this correctly?

On 1 Oct 2007, at 12:28, John J. wrote:

Any tips or resources for creating a wrapper or bindings in Ruby to
an existing C library?
How does one go about this correctly?

The pickaxe has an excellent chapter on how to proceed with a simple
library:

http://www.rubycentral.com/pickaxe/ext_ruby.html

Alex G.

Bioinformatics Center
Kyoto University

John J. wrote:

Any tips or resources for creating a wrapper or bindings in Ruby to an
existing C library?
How does one go about this correctly?

http://www.swig.org/ is pretty widely used.

John J. wrote:

SWIG may be the way to go.
I’m learning Allegro at the moment and thinking how much less work it
would be to type it in Ruby…
I’ve seen some people have done some Perl SWIGging with Allegro.
But I’ve got a bit too much going on to learn SWIG at the moment. I just
want to find out what I may be facing.

The Pickaxe has an excellent chapter on extending Ruby, or you can read
the README.EXT that comes with the Ruby source files.

SWIG may be the way to go.
I’m learning Allegro at the moment and thinking how much less work it
would be to type it in Ruby…
I’ve seen some people have done some Perl SWIGging with Allegro.
But I’ve got a bit too much going on to learn SWIG at the moment. I
just want to find out what I may be facing.