I’ve been working on this for a couple of months now, and now it is ready for an initial announcement of my tools to cross compiling OCaml and ReasonML Native.
Out of box it can cross compile most dune and topkg, packages available on opam for a couple of platforms, there is also patches for popular packages.
You can also compile opam packages by making an wrapper, like
Your package should build with OCaml 4.10, and all the packages that are built for the
host will also be build for the
target, so sometimes you need to fix a package that you will not use directly.
Some packages you will need to pin to a
dune-universe fork version
## compile your project
## generate the wrapper
esy add -D generate@EduardoRFS/reason-mobile:generate.json
esy generate android.arm64
## build for android.arm64
All of the following are tested from Linux and macOS, but I would suppose that FreeBSD should be also working as a build system.
In the past I was able to build
Revery the UI framework for
But recently I did compile
esy the package manager itself for all of the following platforms above from an
Arch Linux x86_64 and
macOS Catalina x86_64. Including
iOS, with the right version of OCaml it will run inside of the new
macOS ARM64 and inside of a jailbroken iPhone.