Windows support for Jane Street OCaml Core?

I read https://realworldocaml.org/ (by the way, this is a wonderful book), and all the examples suggest using the Jane Street Core library. I am not familiar with the OCaml environment yet and would like to read this book on my Windows laptop - without getting into the details, is there an easy way to get these libraries to work on Windows? The answer to this question is likely to help many people who would like to get started with these libraries on Windows. If not, then perhaps this book is good enough to convince me to switch the OS;)

Edit - they just found out that now there is no support, but that it works. Is there any approximate timeline?

+6
source share
2 answers

I would suggest that you use a virtual machine such as VMware Workstation , Windows Virtual PC or Oracle Virtual Box .

You can get the Virtual Appliance with an OS installed and ready to run for many Linux OSs.

I have personally used VMware for decades and run OCaml on Debian on a VMware workstation.

Addition

Since someone just supported it, and I did not remember the question that I re-read. Good, because there is probably a better way to do this on Windows, but I have not tested it, but will tell you what I will do / do. :)

Install WSL (Windows Subsystem for Linux) AKA Bash on Ubuntu on Windows. This allows you to run the Ubuntu environment on Windows without the need for a virtual machine.

Then install OCaml on the WSL by following the Ubuntu instructions .

Then follow the instructions in the Ubuntu Linux Installation Instructions for Real World OCaml.

Since WSL is not intended for use with a graphical interface (but this is often done), use Visual Studio code using the OCaml extension installed on Windows.

Thus, the project directory with files and Visual Studio Code will be in the Windows file system, and the OCaml environment will be in the Linux file system under WSL.

To use files in the Windows file system from WSL, simply use the symbolic link.

Sorry for the brief explanation, but this is better than not knowing.

+5
source

The book suggests using OPAM to install environments such as utop and Jane Street Core, but OPAM still doesn't work on Windows.

I believe that Jane Street guys never run OCaml programs on Windows, so even if OPAM is ported to Windows, it is unlikely that Core can run smoothly on Windows.

+1
source

All Articles