-
Notifications
You must be signed in to change notification settings - Fork 470
Split rescript npm package into multiple subpackages #6183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Milestone
Comments
5 tasks
Note that this technique only works for And probably wouldn't work for |
8 tasks
This was referenced Apr 14, 2025
Merged
Per-platform binary packages implemented in #7395 for v12. Splitting up runtime/stdlib will be done in a future version. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This one is probably for v12 and beyond.
1.) In #6133, the suggestion was made to provide separate npm packages for compiler binaries for each platform, add them as optional dependencies to the
rescript
package and leverage built-in functionality of the package manager to automatically install only the matching binaries for the current platform similar to how esbuild does it. This would yield the following packages for the compiler binaries:This change would reduce the amount of disk space used by
npm install rescript
.2.) In addition, the runtime / standard libraries could also be extracted from the main
rescript
package into separate packages:@rescript/ocaml-compat (for the existing OCaml standard library modules)Some of these could be installed by default as dependencies of the
rescript
packages and others could be made optional.The cmi/cmj caches could then be built only for the relevant installed packages on the first project build, instead of during CI build.
Advantages:
The text was updated successfully, but these errors were encountered: