What is the best way to combine Ruby and other languages? (Especially C ++)

I am learning Ruby, and I am starting to play with building extensions in C. I have the Ruby The Pragmatic Programmers Guide programming, and so I can follow the basic nuts and bolts. I was wondering if there was any great framework / something that could help the interaction between Ruby and other languages, with C ++ being the most important for me. I tried searching on the Internet, but the results are focused on comparing languages, not language compatibility.

TIA

Andy

+3
source share
3 answers

SWIG. C ++ , . Python, TCL Perl, Ruby.

+1

Ruby Java, JRuby. Java Ruby Java/ Ruby.

http://jruby.org/

0

FFI is the recommended way to link Ruby implementations to C libraries, but a little Googling suggests that this probably won't work with C ++, so try SWIG. There is an FFI-SWIG here .

0
source

Source: https://habr.com/ru/post/1741526/


All Articles