Open MisterDA opened 1 year ago
Hi
I'd be down to switch to dune
support. The tricky part, I believe, is to figure out how to make cross-compilation work. To do this, some of the programs used to get system-specific constants have to be run through wine
. See: https://github.com/savonet/ocaml-posix/blob/main/posix-socket/src/generator/exec.sh
I'm not sure if dune
supports that with ctypes. The cross-compilation layer for dune
is very powerful but it assumes that all binaries that need to be executed have to built for the architecture running the build, not the target one.
Dune 3 has native support for ctypes. It now shows warnings when building ocaml-posix packages. I think it would be nicer to switch to the new stanza, but it's not clear to me how to proceed, seeing that we have C code being generated by hand. https://dune.readthedocs.io/en/stable/foreign-code.html#stub-generation-with-dune-ctypes