go-ruby-stdlib

One pure-Go, CGO-free import for the whole MRI-compatible Ruby standard library.

pure Go · zero cgo 43 modules MRI byte-exact one aggregate import differential oracle 100% coverage 6 arches · 3 OSes static binary
Aggregate module: stdlib Ecosystem source
pkg.go.dev reference License: BSD-3-Clause Go 1.26.4+ Modules 43

go-ruby-stdlib is the umbrella for a family of pure-Go (no cgo) reimplementations of the Ruby standard library, each faithful to reference Ruby (MRI) and validated by a differential oracle against the ruby binary. Import the aggregate github.com/go-ruby-stdlib/stdlib to pull the whole tower, or depend on any single module directly. Every module below lives in its own org — click through to its repo, landing page, or docs.

Waves 1–2 — core

14 modules · front-end, formatting, serialization, crypto digests

regexp

Ruby Regexp

Onigmo-compatible regular-expression engine

format

Ruby format/sprintf

sprintf / format / String#% formatting

optparse

Ruby OptionParser

OptionParser command-line option parsing

bigdecimal

Ruby BigDecimal

arbitrary-precision decimal arithmetic

shellwords

Ruby Shellwords

POSIX shell-style word splitting and escaping

Wave 3 — collections, numerics, text & net

21 modules · the broad stdlib middle

set

Ruby Set

unordered unique collection with full set algebra

getoptlong

Ruby GetoptLong

GNU-style command-line option parsing

unicode-normalize

Ruby unicode_normalize

Unicode normalization (NFC/NFD/NFKC/NFKD)

rexml

Ruby REXML

XML DOM, parsing, serialization, XPath subset

Wave 4 — utilities

8 modules · logging, randomness, IO helpers

securerandom

Ruby SecureRandom

cryptographically-secure random values

Every module is pure Go with CGO_ENABLED=0 — trivial cross-compilation, a single static binary, no C toolchain — MRI byte-exact, and standalone & reusable: each is the backend bound by rbgo into github.com/go-embedded-ruby, with the dependency running the other way. 100% coverage is the CI gate, green across the six 64-bit Go targets and three OSes.