Thicket thicket
ocaml
REPOS 9

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

W29.2026 · 13–19 Julocsigen/js_of_ocaml

Features

  • Pointer Capture API bindings added to Dom_html.element (merged). setPointerCapture, releasePointerCapture, and hasPointerCapture are now typed methods; pointerEvent gains getPredictedEvents, altitudeAngle, and azimuthAngle. #2403

  • Lwt_js_events.load/error/abort accept any #Dom_html.element (merged). The .mli restriction to imageElement is removed; the implementation was already generic. Backward compatible. #2404

  • Experimental --esm flag for ES module output (open, RFC). js_of_ocaml compile --esm, build-runtime --esm, and link --esm emit .mjs files with named imports/exports instead of IIFE globals. link --esm --bundle produces a single tree-shaken module. Separate-compilation link step is faster than script concatenation when per-unit files are already 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, srcObject, and missing event listeners. #2401

Compatibility and Releases

  • Single linear memory for Safari (open). The runtime previously declared four separate linear memories; Safari rejects multi-memory modules. All memories now share one. #2405

  • Wasm FFI "bad cast" root cause identified (closed, no fix in this repo). A Js.Unsafe.coerce read in ocsigen-toolkit inferred int for a fractional pageYOffset, trapping at the wasm FFI boundary. Fix lands in #271. Any Js.Unsafe.coerce read typed as int/bool/float is a latent wasm trap. #2406