Building Ahrefs codebase with Melange

At Ahrefs, we make extensive use of OCaml and ReScript —previously known as BuckleScript. So we have been following the latest developments in the ReScript ecosystem with great interest.

A few months ago, António Monteiro released Melange, a fork of ReScript with an emphasis of keeping compatibility with OCaml ecosystem. One of the key features of Melange is that it uses OCaml 4.12, with all the upsides that that entails (ppxlib, let syntax, better errors, …). Besides that, Melange has been modeled recently as just a compiler-libs library, so it can be integrated with other OCaml code in a single opam switch.

We decided to give Melange a try recently at Ahrefs, and shared the results of this experiment in a blog post:

We are currently looking into how a deeper integration with Dune would look like. If your team or company has tried Melange, or is interested on doing so, we would be very interested to hear your use cases and share experiences.