Skip to main content

MEP-56 research bundle: Mochi to Ruby transpiler

Author: research pass for MEP-56 (Mochi to Ruby transpiler). Date: 2026-05-29 (GMT+7).

This bundle contains the twelve research notes that informed MEP-56, the Mochi-to-Ruby transpiler. The notes are informative; the normative spec is in the MEP body.

#TitleTopic
01Language surfaceMochi features mapped onto CRuby 3.2+ / JRuby / TruffleRuby lowering obligations
02Design philosophyWhy Ruby 3.2 floor, why Data.define records, why Thread::SizedQueue streams
03Prior-art transpilersOpal (Ruby-to-JS), RubyMotion, Crystal, mruby, JRuby, TruffleRuby, Artichoke
04Runtime building blocksCRuby stdlib, Thread, Fiber, Data.define, Enumerator::Lazy, net/http, json
05Codegen designRuby source via rtree IR, aotir reuse, 2-space indent, rubocop-compatible output
06Type-system loweringMochi types onto Integer/Float/String/Array/Hash/Set/Data.define/lambda
07Ruby target and portabilityCRuby 3.2/3.4/4.0, JRuby 10, TruffleRuby 33, mruby 4 subset, Tebako binary
08Dataset pipelineQuery DSL via Enumerable::Lazy, group_by with sorted keys, compile-time Datalog
09Agents and streamsAgents as Ruby classes + Thread, Thread::SizedQueue MPMC broadcast streams
10Build systemRubyGems gemspec, Bundler, IRuby kernel, Tebako packaging, TruffleRuby native
11Testing gatesPer-phase Go test gates, vm3 oracle, CRuby/JRuby/TruffleRuby matrix in CI
12Risks and alternativesmruby subset limitations, TruffleRuby polyglot API, Tebako signing, cassette drift

The companion MEP body lives at /docs/mep/mep-0056. Implementation tracking lives at /docs/implementation/0056/.