# Compiling Ruby

**URL:** <https://www.ruby-forum.com/t/compiling-ruby/94231>\
**Category:** Ruby\
**Created:** [April 26, 2006, 12:47am UTC](https://www.ruby-forum.com/t/compiling-ruby/94231 "2006-04-26T00:47:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kuppas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/8edcca/32.png) [@kuppas](https://www.ruby-forum.com/u/kuppas)\
**Post date:** [April 26, 2006, 12:47am UTC](https://www.ruby-forum.com/t/compiling-ruby/94231/1 "2006-04-26T00:47:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![kuppas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/8edcca/32.png) [@kuppas](https://www.ruby-forum.com/u/kuppas)\
**Post date:** [April 26, 2006, 12:58am UTC](https://www.ruby-forum.com/t/compiling-ruby/94231/2 "2006-04-26T00:58:20Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![kuppas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/8edcca/32.png) [@kuppas](https://www.ruby-forum.com/u/kuppas)\
**Post date:** [April 26, 2006, 1:05am UTC](https://www.ruby-forum.com/t/compiling-ruby/94231/3 "2006-04-26T01:05:43Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![kuppas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/8edcca/32.png) [@kuppas](https://www.ruby-forum.com/u/kuppas)\
**Post date:** [April 26, 2006, 4:29pm UTC](https://www.ruby-forum.com/t/compiling-ruby/94231/4 "2006-04-26T16:29:37Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![kuppas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/8edcca/32.png) [@kuppas](https://www.ruby-forum.com/u/kuppas)\
**Post date:** [April 26, 2006, 7:19pm UTC](https://www.ruby-forum.com/t/compiling-ruby/94231/5 "2006-04-26T19:19:44Z")

</div>

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.
