I wish F# would take a similar approach. Nothing seems to come close.
OCaml on Windows seem to only run under Msys or cygwin. Do most OCaml devs develop on Linux?
I wish F# would take a similar approach. Nothing seems to come close.
OCaml on Windows seem to only run under Msys or cygwin. Do most OCaml devs develop on Linux?
As for Cygwin, that was my choice for a long time when I started with OCaml.
For building fully-native Windows apps, I've used https://fdopen.github.io/opam-repository-mingw/installation/. However, it still requires a Cygwin environment to run in, because, as yawaramin mentioned, much of the OCaml ecosystem assumes Linux-like tools during build. So, effectively, the Windows setup looks a bit like cross-compilation, where your build environment is Cygwin, but the output is non-Cygwin full-native Windows binaries.
The compiler itself and core tools like Dune don't assume Linux tools and are portable. It's many of the packages among the rest of what is there that trigger the Linux tools dependency.
But the toolchain can produce applications that run on Windows without any special support, and people have been shipping OCaml apps on Windows for a long time. E.g. the Unison file sync utility, the MLDonkey file share program.