SWIG and Ruby/DL

  • Thread starter Peter C. Verhage
  • Start date
P

Peter C. Verhage

Hi,

Just thinking out loud, but wouldn't it possible to generate Ruby/DL
code instead of Ruby C wrapper code using SWIG? This would make it a lot
more easy to use extensions cross-platform without the need for compilation.

Regards,

Peter
 
J

Jamis Buck

Hi,

Just thinking out loud, but wouldn't it possible to generate Ruby/DL
code instead of Ruby C wrapper code using SWIG? This would make it a lot
more easy to use extensions cross-platform without the need for compilation.

Regards,

Peter

I'm no SWIG expert, but I should think it would be possible.

However, my recommendation: hold off on doing anything significant
with Ruby/DL for now. Until Ruby/DL2 comes out, anyway.

- Jamis
 
L

Lyle Johnson

Just thinking out loud, but wouldn't it possible to generate Ruby/DL
code instead of Ruby C wrapper code using SWIG? This would make it a lot
more easy to use extensions cross-platform without the need for compilation.

You might be able to get something to work for some limited cases,
where the code to be called is regular C code. I don't know how you'd
get this to work for C++ code, however (e.g. how does Ruby/DL deal
with name mangling, calling constructors and destructors, templates,
exceptions, ?)
 
C

Carl Youngblood

Jamis said:
However, my recommendation: hold off on doing anything significant
with Ruby/DL for now. Until Ruby/DL2 comes out, anyway.

- Jamis
Any word on when that is going to be?

Carl
 
G

gabriele renzi

Lyle Johnson ha scritto:
You might be able to get something to work for some limited cases,
where the code to be called is regular C code. I don't know how you'd
get this to work for C++ code, however (e.g. how does Ruby/DL deal
with name mangling, calling constructors and destructors, templates,
exceptions, ?)

it does not, DL is for C, not c++. IIRC a related note from the author
was that writing a DL for c++ would be damn close to writing a c++
compiler (ok, maybe not this exact words :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top