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 otherocaml*.exe
andflexlink.exe
. Since the standard library directories are hardcoded byocamlc -config
asC:/DiskuvOCaml/OcamlSys/32/lib/ocaml
andC:/DiskuvOCaml/OcamlSys/64/lib/ocaml
the most useful scenario is continuous integration (GitHub Actions, etc.) where you can extract the archive toC:\DiskuvOCaml\OcamlSys\{32|64}
. The archive contains reproducible source code which is Apache v2.0 licensed. Andocamlc
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 docd 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 dowith-dkml dune build
,with-dkml ocamlc ...
, etc. to build and test your application. Or instead ofvagrant ssh
you can open Virtual Box, display the Windows desktop, and open the x64 Native Tools Command Prompt to hack away on your project withoutwith-dkml
Known issues:
- Installing from mainline China frequently errors out. A short term fix is available at https://gitlab.com/diskuv/diskuv-ocaml/-/issues/6#note_726814601
Links:
- Installation instructions for the latest version
- Release notes for all versions including upgrading instructions
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)