OCaml Runtime Translated to Rust
Michael Bacarella has rewritten the OCaml runtime, using a coding agent to translate the existing C code to Rust line by line.
Michael Bacarella on 2026-06-09:
The headline results are "eh, just about parity, kinda"
Runtime Bytecode (cycles vs C) Native (cycles vs C) C (trunk) 1.00x: (baseline) 1.00x (baseline) Rust (stable) 1.44x, slower than C ~1.05x (range: 0.87-1.13) Rust (nightly) (ETCs) 0.91x, faster than C same as Rust stable
Michael guided a single Claude Opus 4.7 agent through a straightforward translation plan, over the course of seven days. I appreciate this result in automatic software engineering, applied to my favorite programming language. It is one more piece of evidence for the new future of software engineering we find ourselves in: a correct result on a large, non-trivial program, with minimal engineering guidance. Of note: once again, comprehensive test suites are worth their weight in gold when translating large programs.
The post is overall worth a read if only to learn more about why the runtime is written in C, not OCaml, or how to guide an coding agent on a seven day quest.