If I am not mistaken, the subtle window manager embeds ruby within its C
code.
http://subforge.org/projects/subtle/repository


On Wed, Nov 14, 2012 at 2:37 AM, Reid Thompson <Reid.Thompson / ateb.com>wrote:

> On Tue, 2012-11-13 at 09:43 +0900, Graham Menhennitt wrote:
> > My C program calls a third-party Windows DLL to provide access to some
> specialised hardware. I don't have source code for this DLL. We're losing
> access to the hardware soon but we want to be able to test our software via
> an emulator. I'd like to write the emulator in Ruby.
> >
> > So I need a simple way to call Ruby from C - a bit like a reverse SWIG.
> I can do it using an RPC mechanism to a separate process, but I was
> wondering if anybody knew of a simpler way. Something where a Ruby library
> ran in the same process as the C code would be ideal.
> >
> > Any ideas please?
> >
> > Thanks,
> >    Graham.
>
> http://www.ruby-doc.org/docs/ProgrammingRuby/html/ext_ruby.html scroll
> down to
>
> Embedding a Ruby Interpreter
>
> or google
> embedding ruby in C
> for other examples
>
>
>
>


-- 

Saji N Hameed,
ARC-ENV, Center for Advanced Information Science and Technology,
University of Aizu, Tsuruga, Ikki-machi,
Aizuwakamatsu-shi, Fukushima 965-8580,
Japan

Tel: +81242 37-2736
Fax:+81242 37-2760
 email: saji / u-aizu.ac.jp
 url: http://www.u-aizu.ac.jp
 bib: http://www.researcherid.com/rid/B-9188-2009