Skip to main content

MEP-47 research notes

These twelve notes are the deep research that fed MEP 47 (Mochi-to-JVM 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 JVM lowering obligations
02Design philosophyWhy JVM, why JDK 21 LTS, why Java source as IR
03Prior-art transpilersKotlin, Scala, Clojure, Groovy, JRuby, Eta, Ceylon, ASM, ByteBuddy, ClassFile API, GraalVM, Project Leyden, D8/R8/ART
04Runtime building blocksJDK 21+ baselines, Loom, JFR, Jackson, snakeyaml-engine, java.time, java.net.http
05Codegen designJava source via JavaPoet + javax.tools.JavaCompiler, ClassFile API hot path
06Type-system loweringType-by-type mapping to JVM primitives, JDK collections, records, sealed interfaces
07JVM target and portabilityJDK 21/25 LTS matrix, OS matrix, GraalVM, Android via D8/R8
08Dataset pipelineQuery DSL lowering via Stream API + collectors, hash-join, primitive specialisation
09Agents and streamsLoom virtual threads, Flow.Publisher, supervision in user-space
10Build systemGradle/Maven plugins, Maven Central, jlink, jpackage, GraalVM native-image
11Testing gatesPer-phase Go test gates, JDK matrix, native-image gate, JFR pinning gate
12Risks and alternativesRisk register, Kotlin/Scala/Akka rejected and why

Each note's filename uses the NN-slug.md convention; the leading NN- is stripped by Docusaurus for the URL path, so cross-links inside the notes use the unprefixed slug (e.g. [[language-surface]]).

The companion MEP body lives at /docs/mep/mep-0047.