

Note that only OCaml version 4.14.0 is available via Diskuv OCaml.Īdvanced Users: If you are familiar with Cygwin or WSL2, there are other installation methods described on the OCaml on Windows page. Expect to see another officially-supported Windows installation provided directly by opam in the coming months it will be compatible with your DKML installation. In this section, we'll describe using the Diskuv OCaml ("DKML") Windows installer. More information can be found on the official website. If you want the latest release, consider installing it through the binary distribution, as shown below: $ bash -c " sh.
SWITCH BREW INSTALL
# Ubuntu and Debian: $ apt install opamĭepending on your package manager, you won't get the latest release of opam.
SWITCH BREW DOWNLOAD
If you are using an unsupported Linux distribution, please either download a precompiled binary or build opam from sources. All supported Linux distributions package at least version 2.0.0 (you can check by running opam -version). On the opam site, find details of all installation Linux (e.g., apt-get install opam or similar). It's easy to install opam with your system's package manager on Or if you're using MacPorts: # With MacPort: $ port install opam If you're installing with Homebrew: # With Homebrew: $ brew install opam The details are available in the above links, but for convenience, we copy a few of them here: To install opam, you can use your system package manager or download the binary distribution. Gcc, build-essential, curl, bubblewrap, and unzip. The following steps require to have these packages or tools installed: The best way to install OCaml is with opam, OCaml's package manager. Note: OCaml is available as a package in most Linux distributions however, it is Linux or macOS: Installation on Unix, including Linux and macOS.Switches allow us to install independent sets of dependencies for different projects.įind all the installation instructions for both Unix-like systems and Windows in the sections below: Opam introduces the concept of a "switch," which is an isolated environment that contains an OCaml compiler together with a set of OCaml packages. Opam makes it practical to deal with different projects which OCaml has an official package manager, opam, which allows you toĬonveniently switch between OCaml versions and much more. For more information on using the CLI, please visit the Command Line Crash Course video to learn some basics. Ensure you use the exact case and spacing shown, then hit return/enter at the end of every line. Type each command after the prompt $, although it's often represented by a %, >, or another symbol as well.
SWITCH BREW CODE
The code blocks (in black) on this page show the required commands (the text after # gives more information on the following commands). On Linux, you are already familiar with a shell (typically bash or zsh).There is an older shell called "Command Prompt" you can use as well On Windows, you can start PowerShell by pressing the Windows key ( ⊞), typing "PowerShell," and then clicking Open Windows PowerShell.On macOS you will run the Terminal app to start a shell.When this page asks you to enter commands in your shell, use the following instructions for your system: It's also known as a command line interface (CLI). Guidelines for Following Instructions on this PageĪ shell is a program that will let you enter commands in a text window using only your keyboard. Interested in reading OCaml on Windows first. If you are setting up OCaml on Windows and are unsure which installation method to use, you might be However, please note that it is still experimental and in active development. Which installs both OCaml and the OCaml Platform tools. Note that, if you use Windows Subsystem for Linux (WSL), the Unix instructions can be used on Windows.Īlternatively, for Linux, macOS and *BSD, there is also the OCaml Platform Installer For Windows, we provide instructions on this page for installing OCaml 4.14.0 via the Diskuv OCaml Installer. We provide installation instructions for Linux, macOS, and *BSD for all OCaml versions. Of course, this includes installing the compiler itself, but it also installs a build system, a package manager, an LSP server to support your editor, and a few other tools that we describe later, setting up editor support, and bootstrapping a new project. This page will walk you through the installation of everything you need for a comfortable development environment to write projects in OCaml code.
