Why OxCaml exists

OxCaml starts from OCaml's safe, high-level programming model and adds explicit, compiler-checked control over low-level behavior needed for high-performance code: allocation, memory layout, and parallelism.

OxCaml is still under active development. New features and changes are driven by concrete developer demand, especially from performance-sensitive applications.

Parallelism

Parallel programs must not introduce data races. OxCaml's type checker tracks which functions can run in parallel and how they may access captured mutable state.

Allocation

A GC pause at the wrong time is unacceptable in low-latency code. OxCaml adds stack allocation, with type checking to ensure stack-allocated values do not outlive the stack frame that allocated them.

Memory layout

High-performance programs need cache locality, fewer pointer indirections, and fewer heap allocations. OxCaml uses types and layouts to give control over memory layout.

OxCaml language features

To allow this extra control safely, OxCaml adds several type system features.

Learning goals

By the end of the course, you should be able to: