Repository navigation
Upgrade js_of_ocaml and wasm_of_ocaml to 6.5.0 - #9051
Conversation
6.5.0 links the playground compiler faster and emits a smaller bundle. Its build-fs now encodes file contents in base64, which compresses worse and needs a runtime primitive the standalone cmij files cannot reach, so the playground writes its cmij files itself, with the same contents. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RXfJoyYrXm1fPyDMWV8xnx Signed-off-by: Christoph Knittel <ck@cca.io>
Changelog🏠 Internal
Semantic Diff2 commits · Full page Upgrade js_of_ocaml and wasm_of_ocaml to 6.5.00841977 · cknitt + Claude · Oct 26, 2026, 09:18 UTC 6.5.0 links the playground compiler faster and emits a smaller bundle. Its build-fs now encodes file contents in base64, which compresses worse and needs a runtime primitive the standalone cmij files cannot reach, so the playground writes its cmij files itself, with the same contents. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9051 +/- ##
==========================================
+ Coverage 81.33% 81.37% +0.04%
==========================================
Files 456 458 +2
Lines 64273 64503 +230
==========================================
+ Hits 52275 52490 +215
- Misses 11998 12013 +15 🚀 New features to boost your workflow:
|
The changelog check requires a fragment; this one notes the toolchain bump. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RXfJoyYrXm1fPyDMWV8xnx Signed-off-by: Christoph Knittel <ck@cca.io>
rescript
@rescript/belt
@rescript/darwin-arm64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/runtime
@rescript/win32-x64
commit: |
|
Developer playground preview: https://rescript-lang.github.io/rescript/dev-playground/?version=pr-9051 |
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Follow-up to #9043: bumps
js_of_ocamlandwasm_of_ocaml-compilerfrom 6.4.1 to 6.5.0 (pins indune-projectandrescript.opam).Motivation
js_of_ocaml only builds the playground compiler, so this is about the playground and the CI job that builds it. 6.5.0 (changelog) brings:
js_of_ocamluses about 28% less CPU andwasm_of_ocamlabout 10% less (table below).!xconditions, fewer temporaries,return c ? a : b).compiler.jsshrinks by 10% raw and 5.5% gzipped. The Wasm build shrinks by 19%.The two breaking changes (
Typed_array.float*Array_fromArrayand the removedjs_of_ocaml-lwt.logger) don't affect us.compiler/jsoouses neither.cmij files are now written without
build-fsIn 6.5.0,
js_of_ocaml build-fsencodes file contents as base64 literals, decoded by the runtime primitivecaml_jsbytes_of_base64. Two problems follow for the playground's cmij files:compiler.js, where that primitive isn't in scope, somake playground-testfails withReferenceError: caml_jsbytes_of_base64 is not defined.A cmij file is just a list of
jsoo_create_file(name, bytes)calls.generate_cmijs.mjsnow writes them itself, as escaped byte-string literals like the ones 6.4.1 produced. Loaded into a pseudo filesystem, the new files hold the same 306 files with byte-identical contents as 6.4.1'sbuild-fsoutput. Generating them no longer needsjs_of_ocamlon the PATH.Measurements
These were taken in a Docker container on macOS with OCaml 5.5.2 and the
browserprofile, from cold builds. Sizes are deterministic. Times are two runs each, read from dune's trace (process CPU time), and should be treated as indicative only.Files the playground downloads:
compiler.jsWith 6.5.0's own
build-fsthe total would have been 1,239,890 gzip / 935,592 brotli (+13%).Not shipped: the Wasm build (
.bc.wasm) goes from 3,377,349 to 2,734,673 bytes.Link steps in
make playground(CPU time, two runs):js_of_ocamlwasm_of_ocamlNotes
internalchangelog fragment, as in Upgrade OCaml toolchain to 5.5.2 #9043: this changes the toolchain and how the playground is packaged, not compiler behavior.*.opam, so CI builds a fresh switch with the new pins.opam install js_of_ocaml.6.5.0 wasm_of_ocaml-compiler.6.5.0.🤖 Generated with Claude Code
https://claude.ai/code/session_01RXfJoyYrXm1fPyDMWV8xnx