Thicket thicket
ocaml
REPOS 9

Tools covers builds, package management, editors, documentation and JavaScript compilation.

W37.2026 · 7–13 Sepocsigen/js_of_ocaml

Features

  • Introcaml runtime introspection in JS (open, by hhugo): Block allocations and tuple constants carry descriptor indices; Introspect.Print on options, lists, records, variants, and closures produces output matching the native binary. Gated behind --enable/--disable introspection, enabled by default only on Introcaml-built compilers. #2430

  • Base64 encoding for large binary string constants (open, by hhugo): Constants above a size threshold are emitted as base64 literals decoded once at init, reducing a 3 MB binary payload from 8.3 MB to ~7 MB of generated JS. Short strings remain escaped. #2432

  • Wasm toplevel function splitting (open, by vouillon): A new Split_toplevel pass outlines runs of instructions at liveness boundaries into separate functions, controlled by split-toplevel and toplevel_split_size. Addresses Binaryen/TurboFan failures on large programs. #2423

Fixes

  • Safari 17 static class-field misparse (merged, by habakan): The printer now uses a non-breaking space after static in all four class-element cases, preventing JavaScriptCore 17 from reading a line break as a field separator. Fixes Int64.of_string crashes on Safari 17.x. #2421

  • ASI over-insertion after async/using identifiers (open, by hhugo): The parser previously inserted a semicolon after any line break following these words, breaking x = async\n+ 1 and var async\n= 1. Semicolons are now inserted only before the restricted continuations the spec requires. #2422

  • Single linear memory for Wasm (merged, by vouillon): The four previously separate linear memories (scratch buffer, zstd, blake2, wasi libc) now share one, resolving Safari's lack of multi-memory module support. #2405

Compatibility and Releases

  • Introcaml build support (merged, by let-def, hhugo): js_of_ocaml now builds on the 5.5.0+introcaml opam switch; new Config.oxcaml/Config.introspect flags gate stubs, and unmarshalers skip Introcaml's reserved-bits prefix. Plain 5.5.0 output is unchanged. #2409

  • Toplevel build with tyxml 5 (merged, by hhugo): tyxml 5.0.0's new s element shadowed a string argument in the colorize helpers, breaking type-checking. Arguments renamed to avoid the capture. #2425