Reducing Ruby's footprint

I’m exploring the possibility of including Ruby on a CD as a utility
language for installing and checking licenses for other ‘real’ apps on
the CD. Currently, a C++ program is being used for this and it
compiles to an 8MB executable. I’m confident that the equivilent
utility program written in Ruby would have about 1/4 as much code as
the C++ version and it would be a lot easier to quickly change when
requirements change, but 10 to 20MB of extra space might be hard to
justify. We have the space now, but future releases of the CD will
likely get tighter.

It looks like a Ruby installation takes up about 60MB on Windows. I’m
wondering if it’s possible to get that down to 10MB. Of course, I
know I can just eliminate a lot of items in the library like FOX and
TKlibs (which I don’t need), help docs, and ri. That will save a good
chunk of space, but it doesn’t get me all the way there.

When I look in the \bin directory I see a lot
more files there than I do on a Linux Ruby install which usually just
has the ruby and irb binaries. Of course, I know I can get rid of
irb, but I see several dll’s in that directory that I would have
thought were already available on Windows (msvcrt.dll, for example,
why is that there and can I safely get rid of it?). What are the
glut32 dlls? There are some other libs in the <ruby install

\lib directory that I’m wondering about as well (especially
msvrt-ruby18-static.lib which takes 3MB) - are these there mainly for
creating extensions (and thus, I would assume, I can safely live
without them)?

If anyone else has done something similar please post a list of
files/libs, etc that you were able to live without.

Thanks.

Phil

Phil Tomson wrote:

why is that there and can I safely get rid of it?). What are the
glut32 dlls? There are some other libs in the <ruby install

Can’t help with your other questions, but glut32 is an OpenGL binary, so
you probably don’t neet it.

It looks like a Ruby installation takes up about 60MB on Windows. I’m
wondering if it’s possible to get that down to 10MB. Of course, I
know I can just eliminate a lot of items in the library like FOX and
TKlibs (which I don’t need), help docs, and ri. That will save a good
chunk of space, but it doesn’t get me all the way there.

Base is 4 MB for iPAQ or so. I chopped 1.8.0 to pieces, like here:
Phone Tracker Free | Mobile Tracker | Cell Phone Tracking App
all stripped, naturally. Complete 1.8.1 would be twice that (excluding
ri-documentation, which isn’t generated automatically, afaik; Fox isn’t in
there, either; it also doesn’t contain the dependencies of certain
packages, like Tcl and Tk for ruby-tk).

hth,
Kero.

±-- Kero ----------------------- kero@chello@nl —+

all the meaningless and empty words I spoke |
Promises – The Cranberries |
±-- M38c — http://httpd.chello.nl/k.vangelder —+