Skip to main content

MEP-46 research notes

These twelve notes are the deep research that fed MEP 46 (Mochi-to-Erlang/BEAM transpiler). They are informative; the MEP body, once landed, will be normative. Each note is self-contained and can be read independently. Cross-references use [[note-slug]] markers.

#TitleTopic
01Language surfaceMochi features mapped onto BEAM lowering obligations
02Design philosophyWhy BEAM, why Core Erlang, why OTP wholesale
03Prior-art transpilersElixir, Gleam, LFE, Hamler, Alpaca, Clojerl, AtomVM, OTP internals
04Runtime building blocksgen_server, supervisor, pg, ETS, gun, json, telemetry
05Codegen designCore Erlang via cerl, compile:forms/2 with from_core
06Type-system loweringType-by-type mapping to BEAM terms
07Erlang target and portabilityOTP 27/28 matrix, arch matrix, AtomVM profile
08Dataset pipeline loweringQuery DSL to comprehensions/foldl, Datalog to ETS + semi-naive
09Agents and streams on OTPagents to gen_server, streams to pg, async to monitored spawn
10Build systemrebar3, mix, escript, OTP release, AtomVM packaging
11Testing and CI gatesPer-phase gates, Dialyzer cleanliness, OTP version matrix
12Risks and alternativesRisk register, alternatives rejected