ruby/ruby
External dependencies
CRuby has very few hard dependencies on external software at build time. The list grows considerably if you enable the optional C extensions in ext/.
Core build (no extensions)
| Dependency | Purpose | Required? |
|---|---|---|
| C compiler (C99 or newer) | Compile the interpreter | Required |
make (GNU make works; BSD make also OK) |
Drive the build | Required |
autoconf |
Regenerate configure from configure.ac (only when editing configure.ac) |
Recommended for development |
| Ruby (any recent version) | Bootstrap; runs Lrama and Ruby-implemented build helpers | Required (BASERUBY) |
dlopen/dlsym (or Windows equivalent) |
Load C extensions at runtime | Required for shared-extension builds |
POSIX threads (pthread) |
Backing native threads | Required on POSIX |
libm |
math functions | Required |
That's it for a minimal ./configure --without-ext --disable-yjit --disable-zjit --disable-install-doc build. No GMP, no zlib, no OpenSSL — everything else is optional.
Optional core dependencies
| Dependency | Used by | Effect of absence |
|---|---|---|
libffi |
Fiddle, Etc callbacks (limited) |
Some functionality unavailable |
| Clang / GCC builtins | YJIT/ZJIT bindgen | Slower or missing JIT |
Rust (≥ 1.85.0) |
YJIT, ZJIT | JITs not built (with --enable-yjit requires Rust) |
For a JIT-enabled build:
Rust ≥ 1.85.0 # see Cargo.toml's rust-version
cargo (bundled with Rust)The Rust dependency is only required if you build with --enable-yjit or --enable-zjit.
C extension dependencies
Each extension in ext/ may need OS headers and libraries. The build skips extensions whose dependencies aren't present (with a warning) and continues. The most commonly-required external libraries:
| Extension | External library | Notes |
|---|---|---|
ext/openssl |
OpenSSL ≥ 1.0.2 (or LibreSSL ≥ 3.x) | TLS, hashing, crypto |
ext/psych |
libyaml ≥ 0.1.7 | YAML 1.1 |
ext/zlib |
zlib | Compression |
ext/digest/* |
OpenSSL (optional) | Falls back to built-in implementations if absent |
ext/socket |
libnsl, libsocket (Solaris); built-in elsewhere | Sockets |
ext/readline (where built) |
GNU readline OR libedit | Interactive line editing |
ext/gdbm (where built) |
gdbm | DBM database |
ext/dbm (where built) |
various dbm | DBM database |
ext/syslog (where built) |
libsyslog (most platforms have it built-in) | syslog(3) |
ext/etc |
(none — uses libc) | Unix /etc/passwd |
ext/pty |
various tty libraries (most built-in) | PTY allocation |
ext/json |
(none — pure C) | JSON |
tool/extlibs.rb can fetch and build several of these from source for offline / hermetic builds. The list of bundled builders is in tool/extlibs.rb (e.g., openssl, gmp, libffi, libyaml).
RDoc / documentation
| Dependency | Purpose | Required? |
|---|---|---|
rdoc |
Generate API docs | Built-in (vendored under lib/rdoc/) |
groff |
Render manpages | Optional (only make install uses it) |
--disable-install-doc skips RDoc generation entirely; this is the fastest install option.
Test dependencies
| Dependency | Purpose | Notes |
|---|---|---|
test-unit |
make test-all runner |
Vendored at tool/lib/test/unit.rb |
mspec |
make test-spec runner |
Vendored at spec/mspec/ |
bundler |
make test-bundled-gems |
Vendored as default gem |
All test dependencies are vendored — no network access required.
Bundled gems (installed alongside Ruby)
Bundled gems are not sources — they're fetched as gems at install time. The list pinned for the current build is in gems/bundled_gems:
minitest 6.0.5
power_assert 2.x
rake 13.4.2
test-unit 3.7.7
rexml 3.x
rss 0.x
matrix 0.x
prime 0.x
bigdecimal 3.x
mutex_m 0.x
csv 3.x
fiddle 1.x
logger 1.x
ostruct 0.x
pstore 0.x
benchmark 0.x
getoptlong 0.x
debug 1.x
racc 1.x
tsort 0.2.0
win32-registry 0.1.2These are downloaded from rubygems.org (or a configured mirror) at install time. They're not required for the build itself.
Default gems (shipped vendored in lib/ and ext/)
Every default gem is vendored — its source is in this repo and synced from upstream by tool/sync_default_gems.rb. A non-exhaustive list with their upstream:
| Gem | Upstream |
|---|---|
prism |
github.com/ruby/prism |
optparse |
github.com/ruby/optparse |
uri |
github.com/ruby/uri |
psych |
github.com/ruby/psych |
json |
github.com/ruby/json |
irb |
github.com/ruby/irb |
reline |
github.com/ruby/reline |
rdoc |
github.com/ruby/rdoc |
rubygems / bundler |
github.com/rubygems/rubygems |
did_you_mean |
github.com/ruby/did_you_mean |
error_highlight |
github.com/ruby/error_highlight |
syntax_suggest |
github.com/ruby/syntax_suggest |
forwardable |
github.com/ruby/forwardable |
delegate |
github.com/ruby/delegate |
pathname |
github.com/ruby/pathname |
fileutils |
github.com/ruby/fileutils |
tempfile |
github.com/ruby/tempfile |
tmpdir |
github.com/ruby/tmpdir |
time |
github.com/ruby/time |
timeout |
github.com/ruby/timeout |
prettyprint |
github.com/ruby/prettyprint |
pp |
github.com/ruby/pp |
set |
github.com/ruby/set |
singleton |
github.com/ruby/singleton |
monitor |
github.com/ruby/monitor |
weakref |
github.com/ruby/weakref |
ipaddr |
github.com/ruby/ipaddr |
resolv |
github.com/ruby/resolv |
securerandom |
github.com/ruby/securerandom |
cgi |
github.com/ruby/cgi |
erb |
github.com/ruby/erb |
net-protocol, net-http, net-smtp, net-imap |
github.com/ruby/net-* |
openssl |
github.com/ruby/openssl |
digest |
github.com/ruby/digest |
socket |
github.com/ruby/socket |
etc, fcntl, pty, zlib, stringio, strscan, date |
github.com/ruby/ |
The full mapping is in tool/sync_default_gems.rb's REPOSITORIES hash.
Cargo dependencies (YJIT / ZJIT)
Cargo.toml at the repo root declares no required runtime dependencies:
[dependencies]
yjit = { path = "yjit", optional = true }
zjit = { path = "zjit", optional = true }yjit/Cargo.toml and zjit/Cargo.toml declare optional dev-time dependencies (capstone for disassembly, bindgen for FFI codegen). Release builds use rustc directly without Cargo, sidestepping these.
Vendored licenses
Third-party code shipped in the tree:
- Onigmo (
reg*.c) — BSD-style. Original Oniguruma copyright by K. Kosako; Onigmo additions by various. - st.c — Originally a public-domain hash table by Peter Moore; heavily modified.
- siphash.c — by Jean-Philippe Aumasson and Daniel J. Bernstein. CC0.
- vsnprintf.c — BSD-licensed snprintf implementation.
- CCAN (
ccan/) — small utility code from the Comprehensive C Archive Network. Various BSD-style licenses. - prism — MIT (Shopify).
- YJIT/ZJIT — Same license as Ruby itself.
- MMTk binding — MIT (the binding); MMTk itself is MIT.
The full inventory is in LEGAL (~56 KB). The top-level COPYING file is the standard Ruby license (a dual BSDL / Ruby's own license).
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.