Size of js_of_ocaml generated files

By default dune builds he projects in dev mode, meaning including a series of flags to speed up compilation and have good debug information. If you want a stripped out binary, you need to build in release mode. If I am not mistaken this is just dune build --profile=release.

You can use the dune-workspace file if you want to preselect a different profile by default (not sure if this is a new dune 2 feature or was there, I never used it): https://dune.readthedocs.io/en/stable/dune-files.html

3 Likes