Cross-compiling OCaml with GitHub Actions

As mentioned in the original post, that was a preview for a few months. Jan 2022 was long ago, and I didn’t get any feedback that anybody was using it.

Regardless, I rolled up the cross-compiling functionality into the dkml-base-compiler package. But a huge dose of caution … cross-compiling is not officially supported by OCaml! And unlike when I originally wrote the post, I now actively use my non-free DkSDK CMake product because, among other things, it wraps dkml-base-compiler cross-compiling into a “normal” IDE push-button experience (in fact, as we speak I’m helping some high schoolers use Android Studio to cross-compile OCaml into their Android Java app). So if you use dkml-base-compiler for its cross-compiling features, make sure you have intermediate-advanced comfort with the OCaml compiler, and be comfortable with getting your own support.

Here is what you’ll need if you (or anyone searching in the future) are that intermediate-advanced compiler user and want to get dkml-base-compiler working in your environment:

All the best!

4 Likes