Hello. For me these resources were useful:
- Real World Ocaml (ffi)
- Ocaml-gr
- Array pointers - Ctypes
- Simple example glibc passwd
- Simple case of time POSIX-time
- A small illustrative example
- One case with cflags and rules
These are “small” examples (with them I was able to create a library to read netcdf using ctypes and dune - still work in progress but working).
Note that Leandro Ostera has a long video working in a possible (I understood that) alternative named bindgen. And in this repo you have a implementation of few raylib functionalities using the standard library (I think there is also a video about the process of creating it).
I hope it helps.