Tarides Logo
Laptop keyboard, ejecting disc labeled "52x".

How configurator reads C constants

Etienne Millon

Principal Software Engineer

Posted on Thu, 03 Jan 2019

Dune comes with a library to query OS-specific information, called configurator. It is able to evaluate C expressions and turn them into OCaml value. Surprisingly, it even works when compiling for a different architecture. How can it do that?