Because we need to run OCaml code before the fork. It’s probably best to look at what we’re really trying to do here, see the structure of nbdkit: nbdkit-plugin - how to write nbdkit plugins All of those load/config/… phase calls are implemented as OCaml callbacks.