Janestreet OCaml compiler extensions

This fork of the opam repository contains their implementation of the compiler, which extends 4.14. (However their work on Flambda2 is on 5.1 currently.)

I think you should expect that some things are broken out of the box. For me:

  1. base installs okay, dune installs okay (get dune version 3.10)
  2. core installs if you get version 0.30.0 of ppx_lib
  3. merlin-lib breaks due to reasons mostly related to implicit dependencies that ocamlopt apparently knows how to add automatically but the jane street fork does not (I made a PR for this last night)

Skim through this issue thread, one person went through the work of forking their repository and making an opam repository with working versions of all the key development packages.

Once you get anything installed at all, you can follow along with this youtube video series https://www.youtube.com/watch?v=PgUsmO0YyQc

I went through several of the videos yesterday and I hollered out loud when I saw the allocation count for my code drop from 177k allocations to 2k allocations. Very exciting

Although it took like 15 minutes of tinkering with annotations to get it to that level of performance :smile:

6 Likes