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:
-
Make sure you read and understand https://diskuv-ocaml.gitlab.io/distributions/dkml/doc/CompilingInDepth.html. There are sharp edges. If that content is too difficult to follow, you should rethink whether you want to do cross-compilation using
dkml-base-compiler
directly -
The 1.0 branch of the non-free DkHelloWorld project has which environments can cross-compile. For example, pipeline 873507690 (which will disappear) shows Android and macOS x-compiles. If you are looking at this post in the distant future to see what other environments have been added, try looking for future
1.1
and2.0
(etc.) branches -
Since I don’t yet synchronize DkML with the central opam repository, build the latest
dkml-base-compiler
by adding the https://github.com/diskuv/diskuv-opam-repository#readme repository -
The main source code is https://github.com/diskuv/dkml-compiler#readme
-
It did (and should) build on all the opam platforms, plus Windows MSVC. But for the
dkml-base-compiler
package, and many other DkML packages, I don’t try to maintain GitHub Actions / GitLab CI anymore. Doing CI on my internal machines is vastly more efficient, and I can’t justify doing that level of waste.
All the best!