Description
Add an optional OxCaml compiler switch, inspired by avsm/claude-ocaml-devcontainer which includes a 5.2.0+ox switch using Jane Street's experimental OCaml variant.
OxCaml is Jane Street's fork of OCaml that includes extensions for unboxed types, modal memory management (local allocations, uniqueness), and other experimental features. It's useful for training sessions that cover Jane Street's ecosystem or advanced type system features.
Approach
Add a third opam switch using the OxCaml custom opam repository:
opam repo add ox git+https://github.com/oxcaml/opam-repository.git
Key tools available in the OxCaml ecosystem (from Anil's design): async, core, parallel, ocamlformat, merlin, ocaml-lsp-server, utop.
Considerations
- Image size: A third switch adds significant build time and image size. Consider whether this should be in the dev image or a separate optional layer.
- Compiler version: OxCaml tracks a specific OCaml base version (currently 5.2.0). This will drift from our mainline 5.4.0 switches.
- Tool compatibility: Not all opam packages build against OxCaml. The tool set may need to be a subset of what we install in the standard switches.
- Custom opam repo: Requires adding the
oxcaml/opam-repository as an additional opam repository source for that switch only.
Acceptance Criteria
Description
Add an optional OxCaml compiler switch, inspired by avsm/claude-ocaml-devcontainer which includes a
5.2.0+oxswitch using Jane Street's experimental OCaml variant.OxCaml is Jane Street's fork of OCaml that includes extensions for unboxed types, modal memory management (local allocations, uniqueness), and other experimental features. It's useful for training sessions that cover Jane Street's ecosystem or advanced type system features.
Approach
Add a third opam switch using the OxCaml custom opam repository:
Key tools available in the OxCaml ecosystem (from Anil's design):
async,core,parallel,ocamlformat,merlin,ocaml-lsp-server,utop.Considerations
oxcaml/opam-repositoryas an additional opam repository source for that switch only.Acceptance Criteria
async,core) are available in the switch