Alice the Caml
Alice is a radical, experimental OCaml build system and package manager. Its goal is to allow anyone to program in OCaml with as little friction as possible.
Install on Windows with WinGet:
Alternatively you can install Alice from its opam package:
Additionally, you’ll need a C compiler to use Alice on Windows. It’s recommended to install msys2
and add the path to the directory containing cc.exe to your PATH variable. For example assuming the default install
location for msys2, in PowerShell run:
…or in CMD.EXE run:
Install on macOS with Homebrew:
…or run the install script:
You’ll need curl and git to be installed in order to run the script.
After completing the installation the alice command will be available in
new terminal sessions.
Alternatively you can install Alice from its opam package:
Install on Linux with the install script:
You’ll need curl and git to be installed in order to run the script.
After completing the installation the alice command will be available in
new terminal sessions.
Alternatively you can install Alice from its opam package:
On NixOS you can instead use the flake github:alicecaml/alice, for example:
Install on any platform supported by opam by installing Alice’s opam package:
See more installation options here.
Here’s how to run your first OCaml program on a computer with no pre-installed OCaml tools (you will need a C compiler though!):
$ alice tools install
$ alice new hello
$ cd hello
$ alice run
Hello, World!
That first line downloads an OCaml compiler toolchain and a couple of
development tools (ocamllsp and ocamlformat). Skip it if you already have
an existing installation of OCaml. Alice runs the OCaml compiler
(ocamlopt.opt) searching the directories in your PATH variable and only
uses its own installation of the tools (installed by alice tools install) as
a fallback.
This project is exploring alternative approaches to OCaml packaging than those chosen by Opam and alternative approaches to building projects than those chosen by Dune.