I’m pleased to announce the initial release of Alice, a radical, experimental OCaml build system, package manager, and environment manager for Windows, macOS, and Linux. Its goal is to allow anyone to program in OCaml with as little friction as possible.
To build your first program with Alice, run:
$ alice tools install # Skip this if you already have an OCaml compiler!
$ alice new hello
$ cd hello
$ alice run
Compiling hello v0.1.0
Running hello/build/packages/hello-0.1.0/debug/executable/hello
Hello, World!
The UI is heavily inspired by Cargo.
An important distinction between Alice’s and Opam’s packaging philosophies is that in Alice, the OCaml compiler and development tools are not packages. The alice tools install command will install a pre-compiled (relocatable!) OCaml compiler, a compatible ocamllsp, and ocamlformat user-wide, similar to how rustup installs the Rust compiler and LSP server. This lets you go from zero to OCaml really fast because you don’t have to build the compiler from source. This speedup is particularly noticeable on Windows where building the compiler can take upwards of 10 minutes.
Alice supports building packages with dependencies on other packages, but currently only local packages are supported, and it can only build Alice packages, not Opam packages. See an example here. I’ll probably add Opam compatibility in the future.
It’s still early days and a lot is missing before Alice could feasibly be used for real projects.
If you want to try it out anyway, install the alice Opam package, the github:alicecaml/alice Nix flake, or run the interactive install script:
curl -fsSL https://alicecaml.org/install.sh | sh
More details about installing Alice are here.
If you want read more, check out the blog.