If you’re talking about FFTW, isn’t that a case where the Ocaml code is used to -assemble- the C implementation (that’s what I remember from when I looked at it ages ago) ? The actual code that is generated, is C code, IIRC.
Also: there’s Js_of_ocaml and Bucklescript, right? Those allow Ocaml to be used from other language runtimes. But if what you mean is “how to use Ocaml code compiled and running in the standard Ocaml runtime,” then … that’s really, really hard. The MSFT CLR was all about this. IIRC somebody did an Ocaml->CLR backend 15yr ago or so?
Unless you actually -share- runtimes (and GC heaps), it’s -painful- to glue together languages. Sure, it can be done (that’s what FFIs are about, at some level) but they’re never straightforward, and there are always compromises and gotchas.