Skip to content

Targets Summary

Single-page roll-up of every (target ISA x OS) combination Mochi MEP-42 could ship, with status and engineering complexity recommendations.

§1 Status legend

  • must-have: Phase 1 ships this combination. Mochi without it is not a credible product.
  • should-have: Phase 1 or early Phase 2. A serious gap if missing.
  • could-have: Phase 2 or later. Valuable to advanced users, not blocking.
  • out-of-scope: not planned for any phase of MEP-42 (might be MEP-43+ or never).

Engineering complexity is a rough 1 to 5 ordinal: 1 = a week or two, 5 = multi-month, multi-engineer effort.

§2 Matrix

Target ISAOSFormatABI FileFormat FileStatusComplexityNotes
x86_64LinuxELF01_x86_64_sysv01_elfmust-have2Cheapest first target. SysV + ELF + static link.
x86_64macOSMach-O01_x86_64_sysv02_mach_oshould-have3Universal 2 with arm64 makes this a freebie if arm64 macOS ships.
x86_64WindowsPE/COFF02_x86_64_windows03_pe_coffshould-have4Different ABI; .pdata/.xdata mandatory.
x86_64FreeBSDELF01_x86_64_sysv01_elfcould-have1Same as Linux modulo .note.ABI-tag.
x86_64OpenBSDELF01_x86_64_sysv01_elfcould-have1Same as FreeBSD; mandatory BTI on capable cores.
x86_64illumos/SolarisELF01_x86_64_sysv01_elfout-of-scope1No reason to skip the work; just no current demand.
aarch64macOS (Apple Silicon)Mach-O03_aarch64_aapcs02_mach_omust-have3Apple variadic delta, ad-hoc signing mandatory.
aarch64LinuxELF03_aarch64_aapcs01_elfmust-have2Pi, Ampere, Graviton, every cloud now has aarch64.
aarch64iOS / visionOSMach-O03_aarch64_aapcs02_mach_oout-of-scope5Provisioning profiles, MH_BUNDLE, App Store machinery.
aarch64AndroidELF03_aarch64_aapcs01_elfcould-have3Bionic loader is stricter; NDK conventions.
aarch64FreeBSD/OpenBSDELF03_aarch64_aapcs01_elfcould-have1Pure AAPCS64; trivial increment over Linux.
aarch64WindowsPE/COFF04_aarch64_windows03_pe_coffcould-have4Snapdragon X / X2 Elite; ARM64 xdata is its own bytecode.
riscv64LinuxELF05_riscv6401_elfcould-have3RVA22/RVA23 hardware exists but user base is small.
riscv64FreeBSDELF05_riscv6401_elfout-of-scope2Niche.
wasm32 (Wasm 3.0 + GC)browser.wasm06_wasm04_wasm_modulemust-have2Cheapest backend; massive distribution reach.
wasm32 (Wasm 3.0 + GC)WASI Preview 2 runtime.wasm06_wasm04_wasm_modulemust-have2Same emitter, different host imports.
wasm64runtime.wasm06_wasm04_wasm_modulecould-have1Memory64; rarely needed but cheap to support.
ppc64leLinuxELF07_other_isas01_elfout-of-scope4POWER10 winding down; very small user base.
s390xLinuxELF07_other_isas01_elfout-of-scope5Big-endian, mainframe-only; no demand.
loongarch64LinuxELF07_other_isas01_elfout-of-scope4Chinese market only; ABI well-spec’d but no global demand.
mips**ELF07_other_isas01_elfout-of-scope3Sunset ISA; MIPS Inc pivoted to RISC-V in 2021.
Apple GPUmacOSMetal AIR07_other_isasn/aout-of-scope5Separate compute pipeline; future MEP territory.
polyglot APEall sixAPEn/a (post-link)05_ape_cosmopolitancould-have3Distribution feature, Phase 2 bundler tool.

§3 Recommended Phase 1 targets

Five host targets, all “must-have” in the table above:

  1. x86_64 Linux (ELF, SysV): cheapest, largest test surface, every CI runner has it.
  2. aarch64 Linux (ELF, AAPCS64): covers Pi, Ampere, AWS Graviton, every modern cloud ARM instance.
  3. aarch64 macOS (Mach-O, Apple ABI): required for Apple Silicon developer adoption.
  4. x86_64 macOS (Mach-O, SysV): comes nearly for free if Mochi ships Universal 2 binaries.
  5. wasm32 with WasmGC: single backend covering browsers and every standalone Wasm runtime (Wasmtime, WAMR, Wasmer, WasmEdge, Spin). Highest leverage per engineering hour.

Estimated Phase 1 effort: ~3-4 engineer-months for first working backends across all five targets, assuming Mochi reuses Go’s debug/elf, debug/macho, and writes its own Wasm emitter from scratch.

§4 Recommended Phase 2 targets

  1. x86_64 Windows (PE/COFF, MS ABI): required for desktop Windows adoption. Estimated 1-2 engineer-months due to .pdata/.xdata and IAT machinery.
  2. aarch64 Windows (PE/COFF, MS ARM64 ABI): Snapdragon X / X2 Elite laptops, ARM64 dev kits. ~1 engineer-month given the AAPCS64 + PE backends both exist by then.
  3. APE bundler: post-link tool that combines per-OS binaries into a single polyglot APE for distribution. ~2 weeks if cosmocc is the dependency.
  4. riscv64 Linux (ELF, RV64GC LP64D): RVA22/RVA23 hardware is real. ~1 engineer-month.

§5 Explicitly out-of-scope for MEP-42

  • iOS / iPadOS / visionOS / tvOS / watchOS: requires Apple developer credentials, provisioning profiles, App Store review. Defer to a dedicated MEP for mobile.
  • ppc64le, s390x, loongarch64: real but small user bases. Add on demand.
  • MIPS: sunset.
  • GPU compute (Metal AIR, CUDA PTX, ROCm, SPIR-V, WGSL): a separate MEP for SIMT codegen.
  • macOS x86_64 once Apple removes Rosetta: handle when it happens (likely 2027+).
  • ARM64EC: deferred until Mochi has a story for x64 plugin interop on Windows.

§6 Critical decisions MEP-42 must make

  1. Which native object writers does Mochi vendor (write itself) vs invoke (shell out to lld, ld, link)? Recommend vendor minimal ELF + Mach-O + PE writers, invoke system linker.
  2. Static vs dynamic linking default? Recommend static for Phase 1 (simpler, fewer runtime dependencies); dynamic in Phase 2.
  3. Linker choice: bundle lld, depend on system linker, or both? Recommend system linker with lld as fallback when missing.
  4. Debug info: DWARF on Linux/Mach-O/Wasm; CodeView (Phase 1) then PDB (Phase 2) on Windows.
  5. Cross-compilation: officially supported in Phase 1 for the five must-have targets from any host? Recommend yes; Go’s standard cross-compile facilities make this cheap.