Brr is a toolkit for programming browsers in OCaml with the
js_of_ocaml compiler. It provides:
- Interfaces to a selection of browser APIs.
- An OCaml console developer tool for live interaction with programs running in web pages.
These manuals are available:
- The Web page howto explains how to compile and integrate your OCaml program in a web page.
- The OCaml console manual has intructions to setup the developer tool WebExtension to peek into your programs at runtime.
js_of_ocamland Brr. Recommended reading.
Also the test directory of Brr's repository has a few examples that use the APIs.
Brr_ioClipboard, Form, Fetch, Geolocation, Media and Storage APIs.
Brr_webaudioWeb Audio API.
Brr_webcryptoWeb Crypto API.
Brr_webmidiWeb MIDI API.
Brr_webworkersWeb and Service Worker APIs.
brr.poke library provides a function to define a poke object for your program so that the OCaml console can interact with it. Use
brr.ocaml_poke library provides support to find and access the
ocaml_poke object provided by your program. The
brr.ocaml_poke_ui library provides an HTML interface to the poke object as an interactive toplevel (REPL). These APIs are used by the OCaml console.
ocaml_pokeobject for OCaml console.
Brr_ocaml_poke_uiInteractive toplevel HTML interface for poke objects.
Strings are in
- Left-pad support is in
Promises are in
Futto safely type them.
Brr.Aborthas support for aborting them.
TypedArrays are in
- Data encoding are in
- Global objects and functions are in
- A remixed HTML DOM API is provided by
- Some browser functionality is in
- The Blob API is in
- The Broadcast and Channel Messsaging API is in
- The Canvas 2D API is in
- The Cache API is in
- The Clipboard API is in
- The File API is in
- The Fetch API is in
- The Form element and Form Data API is in
- The Geolocation API is in
- The History API is in
- The Media capture, media streams and media element APIs are in
- The Notification API is in
- The Performance API is in
- The Service Worker API is in
- The URL API is in
- The Web Audio API is in
- The Web Crypto API is in
- The WebGL2 API is in
- The WebGPU API is in
- The Web MIDI API is in
- The Web Sockets API is in
- The Web Storage API is in
- The Web Workers API is in
Finally note that:
- Brr is incomplete. Exhaustiveness is a non-goal.
- Brr tracks long-term, universal and forward-looking browser changes.
- If you would like to add something, first get in touch on the issue tracker.