[ANN] Windows-friendly OCaml 4.12 distribution 2nd preview release (0.2.0)

0.2.6 of Diskuv OCaml is available.

Some of the more significant changes are:

  • OCaml has been upgraded from 4.12.0 to 4.12.1. Also: 4.13.1 is bundled but is not yet supported
  • Introduce “Vanilla OCaml” zip archives for 32-bit and 64-bit at Releases · diskuv / diskuv-ocaml · GitLab. Contains ocaml.exe, ocamlc.opt.exe, the other ocaml*.exe and flexlink.exe. Since the standard library directories are hardcoded by ocamlc -config as C:/DiskuvOCaml/OcamlSys/32/lib/ocaml and C:/DiskuvOCaml/OcamlSys/64/lib/ocaml the most useful scenario is continuous integration (GitHub Actions, etc.) where you can extract the archive to C:\DiskuvOCaml\OcamlSys\{32|64}. The archive contains reproducible source code which is Apache v2.0 licensed. And ocamlc must be run from a x64 or x86 Native Tools Command Prompt (Visual Studio). A similar 32/64-bit archive for Opam was and still is available
  • Work to split DKML (Diskuv OCaml distribution) and DKSDK (Diskuv SDK) in the existing monorepo has started. DKSDK will support CMake, cross-compilation and building desktop/mobile/embedded applications, where DKML will be a full-featured OCaml distribution used with native (ie. Microsoft, Apple) compilers. DKML will primarily be Apache licensed, as it is today
  • Introduce vagrant to simplify testing Windows installations even on macOS and Linux machines. Assuming you have VirtualBox and Vagrant installed, just git clone https://gitlab.com/diskuv/diskuv-ocaml and do cd vagrant/win32 ; vagrant up ; vagrant ssh to open a Command Prompt terminal. Be prepared to wait 2 hours on a 2-CPU machine. From there you can do with-dkml dune build, with-dkml ocamlc ..., etc. to build and test your application. Or instead of vagrant ssh you can open Virtual Box, display the Windows desktop, and open the x64 Native Tools Command Prompt to hack away on your project without with-dkml

Known issues:

Links:

And thanks to @dbuenzli for nudging me to include Vagrant a few months ago. Vagrant is now part of the automated GitHub Actions testing; the host virtual machine is macOS 10.15 which is the only free GitHub platform that supports nested virtualization into Windows. But you can use it on your Linux/macOS desktop to do your own Windows development.

What’s next?

  • The next version (0.3.0) includes at least one breaking change (upgrade of ocamlformat from 0.8.0 to 0.9.0)
1 Like