Version 0.3.0 of Diskuv OCaml (DKML) is out. DKML is a distribution that, among other things, can do a scripted install of OCaml and a Microsoft compiler on Windows. It is in preview right now.
In an earlier release
with-dkml was introduced. Placing
with-dkml in front of most OCaml tools will let those tools transparently have access to Unix binaries and the Microsoft compiler (examples: 1.
dune build →
with-dkml dune build; 2.
opam install →
with-dkml opam install; or 3.
with-dkml bash opens a Unix environment in the current Windows directory).
Now if you upgrade to 0.3.0 you get more:
- There is a new Opam plugin bundled that will create a Windows local switch. You can just do
opam dkml initto create a new switch configured with Windows code repositories and the Microsoft compiler. Thanks to @kit-ty-kate for writing the opam-build plugin which helped in understanding how Opam plugins work, and @dbuenzli for many OCaml packages leveraged in both the plugin and with-dkml.
- The 4.12.1 OCaml compiler and runtime are installed once to the “system”, which means that if you create an Opam local switch the OCaml compiler+runtime do not have to be recompiled. The huge waste of time doing recompilation is now gone. All credit goes to @dra27 who created scripts in Opam that do almost the same thing. There will be a generally available Windows OCaml system compiler sometime next year (that is, you won’t need DKML), so consider the DKML version to be an early and temporary preview of the Windows system compiler.
- Installation instructions for the latest version. Copy and paste one block of commands, press OK when prompted, and 2 hours later your installation will have finished.
- Release notes for all versions including upgrade instructions
- Send a bug report and/or Stay updated on Twitter
- Installing from mainline China frequently errors out. A short term fix is available at https://gitlab.com/diskuv/diskuv-ocaml/-/issues/6#note_726814601