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

I am pleased to announce the second preview release of the Diskuv OCaml (“DKML”) distribution. Diskuv OCaml is an OCaml distribution focused on a) secure, cross-platform software development and b) ease of use for language learners and professional developers.

Thanks to everybody who tried out the first preview! The first preview was geared towards Windows users who want ease of use and need Microsoft compiled packages. The Microsoft compiler is critical for first-class Windows support: many popular C libraries like ‘libuv’ support the Microsoft compiler as Tier 1 but relegate the GCC compiler to an unsupported third-class citizen.

This second preview has the same Windows users in mind, with several new features and improvements. There are too many changes to list here, but some notable ones are:

  • (Critical security fix) The MSYS2 installer is now downloaded over HTTPS and its SHA256 checksum is validated.
  • Removed auto-installation of Cygwin and removed the 16GB auto-download of two Docker images. This cuts down the install time in half (except for some people; see sharp edges below), and should reduce the frequency of installation failures caused by limited or flaky networks.
  • Autodetection and use of existing Visual Studio instances on your machine if the installations are compatible with DKML.
  • Clarified that students are covered under free personal licenses in a prominent location in the main READMEs.
  • The ctypes, mirage-crypto and feather packages are available for testing in a highly unstable form. That means support may be deprecated in a future release, but today they all build + pass tests with the Microsoft compiler.

There are also some sharp edges in this preview. The major ones are:

  • On some machines (especially Docker containers or VMs) one of the installation commands can peg your CPU for up to 2 hours while making incredibly slow progress.
  • There are backwards incompatible changes. See the release notes linked below.

The Version 0.2.0 release notes has instructions for upgrading and also a detailed list of changes. Instructions for installing from scratch and updated documentation are still at the Diskuv OCaml documentation site.

What’s Next?
Barring some critical security updates, the next preview will focus on Linux and macOS parity, and the removal of the sharp edges. Will post another “[ANN]” and cross-link on Twitter when that preview is

In the meantime, I would appreciate feedback!

Thanks! Jonah
Twitter Follow


0.2.3 0.2.2 is now released.

Some of the bigger changes:

  • (Bug Fixes) Many problems with Visual Studio have been resolved, especially for non-English installations.
  • (Features) Pre-alpha support for macOS and Windows 32-bit, in addition to the existing Windows 64-bit support.
  • (Reliability) There is now an internal GitHub Actions CI system that builds Windows 32-bit, Windows 64-bit and macOS (x64). In the future GitHub Actions will be offered to anyone who needs to test their own 32-bit and 64-bit Windows packages.
  • (Reliability) The Windows MinGW Opam repository vended by fdopen is still used but has been drastically pruned. Now the thousands of MinGW and DKML (MSVC) patches are pinned, and those pinned package versions are tested with the GitHub Actions CI system.

The v0.2.3 release notes has upgrade instructions and a detailed list of changes.


0.2.5 is available. This release brings significant user friendly improvements.

There is a new binary called with-dkml.exe. Just plop with-dkml in front of a Windows command that requires access to Unix scripts (ie. with-dkml opam install) and it should just work.

There is now a section called Beyond Basics in the Diskuv OCaml user documentation that walks through:

  • the first and second tutorials of Getting Started - Learn OCaml
  • the bare Opam essentials you need as a beginner (how to find and select an Opam switch, and how to find and install packages using with-dkml opam install), all without leaving the Command Prompt
  • installing Visual Studio Code with the OCaml plugin

Huge thanks to @Butanium who lent me much of his time to validate usability from the perspective of a newcomer. More feedback is always welcome.


PS. You won’t need with-dkml most of the time. The Beyond Basics documentation shows how to run Dune and the OCaml native compiler directly from the Visual Studio Command Prompt.


HI! I am new to Ocaml. When I follow the documentation (Getting Started with Diskuv OCaml — Diskuv OCaml documentation) to install with powershell in Windows, it suddenly breaks and prompts the following error. what should I do😭

Seems like you found the bug report link at the bottom. For future reference it is Issues · diskuv / diskuv-ocaml · GitLab

Thanks for submitting the bug report.

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:


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