Jane Street's Bonsai: OCaml UI Library for Web Apps

Original: Bonsai: Janestreet's UI Library

Why This Matters

Demonstrates OCaml's viability for production-scale frontend development beyond traditional systems programming.

Jane Street has open-sourced Bonsai, an OCaml-based UI library for building reactive web applications. Used internally for nearly all web tools—from the corporate directory to trading system dashboards—it compiles to JavaScript via Js_of_ocaml and draws partial inspiration from Elm.

Bonsai is an open-source UI library developed by Jane Street, the quantitative trading firm, for building performant and reactive web applications in OCaml. The library uses Js_of_ocaml to compile OCaml code to JavaScript, enabling web deployment.

According to the repository, Bonsai is used internally to build "almost all web applications inside Jane Street," spanning tools as varied as the corporate directory and systems that monitor and interact with trading infrastructure. The library is described as partly inspired by Elm, a functional language known for its architecture for web UIs.

The GitHub repository has accumulated over 1,100 stars and 52 forks. It includes components such as ppx_bonsai, a preprocessor extension, and a trampoline module, alongside documentation assets and benchmarking tools. The project is licensed under MIT and accepts community contributions via its CONTRIBUTING.md guidelines.

The library reflects Jane Street's broader commitment to OCaml as a production language across both backend and frontend systems.

Source

github.com — Read original →