[ANN] dkml-c-probe: Cross-compiler friendly definitions for C compiling

V3 is available. Its C_abi module has some big enhancements:

  • cleaner API (thanks @mseri!)
  • recognizes the BSD family: OpenBSD, FreeBSD, NetBSD and DragonFly on x86_64 hardware
  • integration testing now includes OpenBSD, FreeBSD and one cross-compiling toolchain (macOS x86_64 host that targets arm64)

V3 also has a new module C_conf which occupies the same problem space as findlib / ocamlfind and pkg-config:

  • Unlike findlib which is a specification+tool for 3rd party OCaml libraries, C_conf is a specification+tool for foreign C libraries
  • Unlike pkg-config which is a specification+tool for system (host ABI) C libraries, C_conf is a specification+tool for the multiple ABIs that are present when you cross-compile OCaml or C code
  • Unlike pkg-config which is designed for Unix, C_conf is designed for Windows and Unix where paths may have spaces, backslashes and colons
  • For now the specification is based on environment variables. If it proves useful the specification can be extended.

Examples and doc links for V3 are available at https://github.com/diskuv/dkml-c-probe#dkml-c-probe

2 Likes