Shrinking the OxCaml js_of_ocaml bundle: 285 MB to 4 MB
Summary
This article explains reducing OxCaml js_of_ocaml bundle size from 285 MB to 4 MB by switching from per-CMA bundling to a cross-CMA DCE approach using --export and a toplevel extension patch. It details the workflow, why the small 4 MB bundle is achievable, and the integration tweaks required to compose with an existing browser toplevel and with x-ocaml.