Compiling Ruby


#1

Hi,

I would like to compile Ruby with minimum features like Base Object,
Number, File IO, etc. (ie., I wanted to exclude the unit test, xml, ssl,
UI, etc)

Thanks,
-Kuppa


#2

kuppas kuppa wrote:

Hi,

I would like to compile Ruby with minimum features like Base Object,
Number, File IO, etc. (ie., I wanted to exclude the unit test, xml, ssl,
UI, etc)

Thanks,
-Kuppa

Never tried it, but maybe you could just remove the contents of lib/,
and remove all the subdirs of ext/. But none of these things go into the
ruby executable (except extensions, and even then only if you requested
it by playing with ext/Setup).


#3

Thanks Joel,

Actually I wanted to build small ruby interpreter to fit into some small
OS like DSL, feather Linux, etc.

Thanks,
-Kuppa

Joel VanderWerf wrote:

kuppas kuppa wrote:

Hi,

I would like to compile Ruby with minimum features like Base Object,
Number, File IO, etc. (ie., I wanted to exclude the unit test, xml, ssl,
UI, etc)

Thanks,
-Kuppa

Never tried it, but maybe you could just remove the contents of lib/,
and remove all the subdirs of ext/. But none of these things go into the
ruby executable (except extensions, and even then only if you requested
it by playing with ext/Setup).


#4

When building ruby, a program called miniruby is built; it seems to be
a full ruby interpreter with minimal libs included. At work, I use it
as a FreeBSD sysinstall replacement (well, I wrote a sysinstall
replacement in Ruby, and my statically linked ruby calls that from
init). It seems to do what you need.


#5

Thanks Guest, I think, it should work. I will try and let you know.

-Kuppa

unknown wrote:

When building ruby, a program called miniruby is built; it seems to be
a full ruby interpreter with minimal libs included. At work, I use it
as a FreeBSD sysinstall replacement (well, I wrote a sysinstall
replacement in Ruby, and my statically linked ruby calls that from
init). It seems to do what you need.