package js_of_ocaml-eio

Build not yet checked
  1. Overview
  2. Docs
Eio-based JavaScript bindings

Install

dune-project
 Dependency

Authors

Maintainers

Sources

eio_js_backend-0.1.0.tbz
sha256=72ccf78096c361d6a85f0d854025a88bbf26b042b038d073b93e978dbb4b9a5c
sha512=83855e99a14659b43b65242890d5c134de40910ea70f6006517d09c30d65ed3c0ee398e03d47599644223ef3862bb4c0e484acbf961bbb2ce74636b2fffe2864

doc/CHANGES.html

0.1.0 (2026-12-01)

Initial release.

  • eio_js_backend: an Eio scheduler for JavaScript environments (js_of_ocaml with --effects=cps or --effects=double-translation, and wasm_of_ocaml with --effects=cps).
  • eio_brr: Eio variants of Brr functions, which return directly instead of returning a future.
  • js_of_ocaml-eio: an Eio counterpart of js_of_ocaml-lwt, with Eio_promise to convert between Eio fibers and JavaScript promises.

Uncaught exceptions in fibers are passed to a handler (Eio_js_backend.set_uncaught_exception_handler). With Eio_brr and Js_of_ocaml_eio, the default handler outputs the exception and exits the program with status 2 when possible (under Node.js, for instance). In a browser, the exception is only output (as "Fatal error: …") and the program keeps running: it is not thrown to JavaScript, so window.onerror and error reporting tools do not see it. Set your own handler to report it.