Skip to main content

Phase 10. FFI shells

FieldValue
MEPMEP-45 §Phases · Phase 10
StatusNOT STARTED
Started
Landed
Tracking issue
Tracking PR

Gate

C-direct FFI fixture suite (~15 cases: call a vendored C function, pass scalars + strings + records, return scalars + records, error propagation) compiles + runs byte-equal vs vm3 on host triple.

Goal-alignment audit

To be written before sub-phase 10.0 starts. C-direct FFI is the natural FFI for a C-AOT target and the gateway for the embedding use case. Aligns.

Sub-phases

#ScopeStatusCommitPR
10.0C direct: binding declarations in Mochi; emit header in build dir; user-provided .c neighbour compiled inNOT STARTED
10.1Boxed mochi_value type for FFI-crossing values (sum of scalar + string + handle); marshalling helpersNOT STARTED
10.2Go FFI via Unix-domain RPC (deferred sub-phase; ships after C-direct is green)NOT STARTED
10.3Python FFI via embedded libpython3 (deferred sub-phase)NOT STARTED
10.4TypeScript FFI via QuickJS-NG (deferred sub-phase)NOT STARTED

Decisions made

Fill in along the way.

Deferred work

Go c-archive route (in-process, no RPC): v2, alongside 10.2 review.

Closeout notes

Fill in after gate green.