Thicket thicket
ocaml
REPOS 9

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

W28.2026 · 6–12 Julocsigen/js_of_ocaml

Features

  • WebGL2 bindings (merged): New WebGL2 module adds 3D textures, transform feedback, VAOs, instancing, MRT, and integer attribs. The existing examples/webgl demo now requests a WebGL2 context. #2388

  • Experimental ESM output (open, RFC): js_of_ocaml compile --esm, build-runtime --esm, and link --esm [--bundle] emit ECMAScript modules with named imports, tree shaking, and per-unit files. Separate-compilation link step drops from 16 ms (script) to 9 ms (ESM, units on disk). #2402

  • Web Audio and Media Capture bindings (open): Adds AudioContext, the full node-graph hierarchy, AudioParam automation, MediaStream/MediaStreamTrack, and navigator.mediaDevices. Completes Dom_html.mediaElement with text tracks and srcObject. #2401

  • BroadcastChannel and SharedWorker bindings (open): New modules fill the remaining Tier 2 communication gaps; BroadcastChannel is testable under Node, SharedWorker is browser-only. #2400

  • Manual sidebar ordering (merged): @children_order added to manual/index.mld so odoc lists pages in logical reading order rather than alphabetically. #2359

Fixes

  • Compiler miscompilation in js_simpl/js_traverse (merged): If-fusion now requires an effect-free condition, preventing let a = g() in if a then g() else h() from compiling to a single g() call. Constant-if folding preserves hoisted var declarations; free records catch-parameter destructuring defaults. #2393

Compatibility and Releases

  • Consolidated messageEvent types (merged, breaking): Five per-module messageEvent class types replaced by a single polymorphic ['target, 'data] Dom_html.messageEvent. Old names remain as [@@ocaml.deprecated] aliases; existing code compiles with a migration warning. #2390

  • OCaml 5.6 support (merged): Initial compiler support merged; the 5.6 CI job runs on master. #2227