Hi,

On Mon, Mar 22, 2010 at 4:18 AM, Mark Aufflick <[email protected]> wrote:
> Can anyone point me to any examples/pointers about embedding rubininus
> in another C app? Is it wise? I would want to be able to start up new
> rubinius threads from the C side and then call a ruby method or eval
> some ruby code in it.
>
> If instead of multiple threads I wanted multiple rubinius interpreters
> in the same process (what perl 5 calls multiplicity) would I hit any
> issues with global state etc?

Start by taking a look at vm/drivers/cli.cpp.

Rubinius carefully manages "global" state so that multiple
interpreters should be simple to embed. The primary issue right now is
that Rubinius does not compile to a single shared lib you can link
against. We hope to address this post 1.0 release. In the meantime,
you can experiment with linking the same way we do to create the rbx
exe (vm/vm by default).

Let us know if you hit specific issues with your experiments.

Cheers,
Brian

>
> Cheers,
>
> Mark.
>
> --
> Mark Aufflick
>  contact info at http://mark.aufflick.com/about/contact
>
> --
> --- !ruby/object:MailingList
> name: rubinius-dev
> view: http://groups.google.com/group/rubinius-dev?hl=en
> post: [email protected]
> unsubscribe: [email protected]
>
> To unsubscribe from this group, send email to 
> rubinius-dev+unsubscribegooglegroups.com or reply to this email with the 
> words "REMOVE ME" as the subject.
>

-- 
--- !ruby/object:MailingList
name: rubinius-dev
view: http://groups.google.com/group/rubinius-dev?hl=en
post: [email protected]
unsubscribe: [email protected]

To unsubscribe from this group, send email to 
rubinius-dev+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.

Reply via email to