Skip to content

Add doc: why PL/Ruby embeds CRuby (MRI), not mruby#6

Merged
jdatcmd merged 1 commit into
masterfrom
doc/why-not-mruby
Jul 7, 2026
Merged

Add doc: why PL/Ruby embeds CRuby (MRI), not mruby#6
jdatcmd merged 1 commit into
masterfrom
doc/why-not-mruby

Conversation

@jdatcmd

@jdatcmd jdatcmd commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Adds doc/why-not-mruby.md documenting why PL/Ruby links full CRuby (MRI) via libruby rather than embedding mruby, and links it from the README documentation list.

What it covers

  • History — PL/Ruby predates mruby by ~a decade; mruby was never a live alternative when the design was set.
  • Capabilities that would be lost (grounded in PL/Ruby's actual code): full stdlib via require, BigDecimal lossless numerics (jsonb_plruby), the Encoding framework (ltree_plruby/jsonb_plruby), and runtime metaprogramming via rb_eval_string_protect.
  • Internals rewrite — the MRI C API (VALUE, rb_funcall, rb_protect, …) vs. mruby's mrb_state/mrb_value.
  • The one point in mruby's favor — isolated, re-entrant mrb_state vs. MRI's process-global VM.

Docs-only change; no code or behavior affected.

🤖 Generated with Claude Code

Records the rationale for linking full CRuby via libruby rather than
mruby: history (PL/Ruby predates mruby by a decade), MRI C API lock-in,
and the concrete capabilities that would be lost (full stdlib via
require, BigDecimal lossless numerics, the Encoding framework, runtime
metaprogramming). Notes the one point in mruby's favor (isolated,
re-entrant mrb_state vs. MRI's process-global VM) and links it from the
README documentation list.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jdatcmd jdatcmd merged commit 04b0022 into master Jul 7, 2026
8 of 9 checks passed
@jdatcmd jdatcmd deleted the doc/why-not-mruby branch July 7, 2026 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant