Copying opam switches – it should Just Work™
summary
Shows that a handful of targeted runtime changes make opam switches relocatable: switch cloning becomes file-copy fast instead of recompiling, saving 7.5 minutes per OCaml 4.14 build on a 8‑core machine. Implements ld.com to relative paths, adds naming internal libraries by platform/version, and broadens launcher search paths so bytecode/native executables find the right runtime and stubs. A working prototype is built and demonstrated relocating stock compilers successfully.
AI-written summary · about
chapters (8)
- 0:00Intro
- 1:13Existing Approaches
- 3:07Ingredients for relocating
- 3:41How bytecode starts
- 6:34What to do?
- 7:11Finding things
- 8:07Finding the right things
- 9:04Relative paths
related talks
43mOCaml at LexiFi
22mState of the OCaml Platform 2023
26mBuck2 for OCaml Users & Developers
27mHow Codemods Turned a Nightmare into a 3-Minute Migration
27mTry-Mopsa: Relational Static Analysis in Your Pocket
22mProject-wide occurrences for OCaml, a progress report
38mAdvanced Oomph Setup Authoring
44mAdventures In Updating A Legacy Codebase
