ZxCaml

OCaml frontend. Zig backend. Solana BPF.

Write typed Solana programs with an OCaml-shaped compiler path.

ZxCaml borrows upstream OCaml's parser and type checker, throws away the OCaml runtime, and lowers a growing OCaml subset toward deterministic BPF output through Zig.

Compiler Architecture

Keep OCaml's frontend. Own everything after Typedtree.

01

Upstream OCaml

Parsing and type checking are handled by OCaml compiler-libs, without forking the compiler.

02

Core IR

A versioned bridge lowers typed OCaml into ANF-shaped Core IR with layout information.

03

Zig Lowering

The Zig pipeline performs arena-oriented lowering, interpretation, and native code generation.

04

Solana BPF

The target path emits runtime-free artifacts for Solana's constrained execution environment.

Current State

Working prototype, not production adoption.

ZxCaml is early, but the compiler path is no longer just a sketch: the prototype can check, run, and build real examples across the current subset.

P2Subset expansion implemented
0.7Current wire format
29+Example programs
3Interpreter, native Zig, BPF paths

Colosseum Frontier 2026

Built for developers exploring safer Solana programming models.

ZxCaml is being shaped as an early developer tool for the Frontier hackathon: a functional, type-driven route for Solana programs that need deterministic output without carrying a garbage-collected runtime.

Frontier Hackathon