Skip to content

Relocatable compiler in dune #13229

@Alizter

Description

@Alizter

Thanks to David's great work upstream, OCaml 5.5 will be relocatable. Older versions of the compiler also have backports living in a custom opam repository https://github.com/dra27/opam-repository/blob/relocatable/packages/relocatable-compiler/relocatable-compiler.5.4.1.20251109.1/opam.

Supporting the relocatable compiler in package management would mean we can move away from toolchains and build the compiler like a regular package allowing it to be cached.

The constant rebuilds of the toolchains have been a common pain-point for users and the main focus of alternative proposals such as #12179.

In order to use this work in Dune, we need to be able to detect when a given compiler is relocatable. Checking the compiler version for 5.5 is a good start, but for older versions living in David's opam repo we can also check if we are using the relocatable meta package.

For the relocatable compiler to be fully integrated in Dune we will need to do the following work:

🧱 Done

🚧 Work-in-progress (in priority order)

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions