Advanced C binding using ocaml-ctypes and dune

Ideally, bindings could be generated completely automatically, by parsing C headers with clang and generating appropriate interfaces. Languages that have support for this:

See, for example, how I generate bindings automatically for radare2 C headers using those in genbind.py script. It is very simple and straightforward. I wish something like that existed for OCaml.

2 Likes