OS-independent build of ruby (second attempt)

To clarify:

I need a version of ruby that I can bind / extend with OS-independent C++
classes; I only need the basic script functionality (variables, control
loops, classes, etc.), most of the logic will exist in the C++ system
classes.

SWIG is attractive, if it works, but I still need to be able to build an
executable of the ruby interpreter or link it to my executable on a
non-standard OS (game console).

I am considering ruby because it is OO, otherwise I would just take lua. I
need a language with a very small memory footprint; I am open to all
suggestions. Is there a minimal set of sources for ruby that are OS
independent (read: does not require unix, cygwin, or windows wrappers)?

Thanks,

Jeremy

reckless wrote:

SWIG is attractive, if it works, but I still need to be able to build an
executable of the ruby interpreter or link it to my executable on a
non-standard OS (game console).

I think, you will have to port the Ruby interpreter to the game-console.

It may have pitfalls, but I think it is not impossible if you are fit
in C and try it hard. I think you can ignore all the sources in the
ext directory, link statically, try to correct those parts which do not
compile and comment (#undef) all functionality that you can’t repair.

I think that the main core of ruby is fairly OS independent or at
least not too OS dependent.

Best regards, Christian