I’m familiar with the matter in general, but I’ve worked only with C and C++ for interracting with Elixir/Erlang. I’ve not found any simple example for that in OCaml.
How to do it? Without any third-party libraries, but directly: Erlang <-> OCaml, via NIF.
Or, perhaps, only if there’s no direct way: Erlang <-> C <-> OCaml,