I have been writing an application (game library) which embeds Ruby into C as a scripting language, and it has been working beautifully so far. However, I realize that I may need to distribute this application to Windows and OS X machines, which may be a problem for those without the time or skill to install the latest Ruby version. I am wondering if I can package a .dll or .so dynamic library of Ruby in the same directory of the main executable without including most of the Standard Library. I believe this would save about 10-20MB, but it would also remove unneeded baggage such as webrick, openssl, and rubygems from the scripting environment. I am not sure whether I want to *build* ruby without the stdlib, or simply cherry pick the libs from the build output. I am also unsure how and when Ruby loads these libraries when embedded in a host C environment. Possibly during the call to ruby_init_loadpath()?
on 2013-11-02 09:28