← All stories
● Covered by 1 source · 1 reportLow impact1 neutral

Jane Street Releases Bonsai, an OCaml UI Library for Reactive Web Applications

🔄 Updated 1d ago
New to BrevFeed? We gather this story from every outlet covering it into one summary — ranked by real-world impact, not just the latest headline — so you never miss what matters. What is BrevFeed? →

Key points

  • Bonsai is an OCaml UI library for web applications.
  • It is inspired by Elm and used internally at Jane Street.
  • Components are functional state machines with incremental rendering.
  • Allows unified language for frontend and backend development.

Introduction to Bonsai

Bonsai is a new UI library developed by Jane Street for creating performant and reactive web applications. It is written in OCaml and draws inspiration from the Elm programming language. Jane Street has utilized Bonsai internally for a range of its web applications, including corporate directories and tools for monitoring trading systems.

Core Architecture and Features

Bonsai components are implemented as purely functional state machines, which are designed for easy composability. A key feature is its incrementalization framework, which ensures that values are recomputed only when necessary, applying this principle beyond just the view layer to all values within the application.

Unlike other web frameworks that often combine state, incrementality, and rendering into a single UI component abstraction, Bonsai allows for the a la carte composition of state and incrementality primitives. This design enables the same mechanisms that prevent full page re-rendering during user interaction to also incrementalize complex business logic computations on live-updating datasets.

State Management and OCaml Integration

Bonsai provides an extensive API for managing the lifecycle and scoping of state, as state is not directly associated with explicit components. This simplifies embedding collections of stateful UI components within other components, as Bonsai handles state management automatically, removing the need to manually hoist internal component state to a top-level model.

The use of OCaml for Bonsai means developers can use a single language and type system across both the backend and frontend. This unified language approach is intended to improve legibility and maintainability for large web application codebases.

✨ This summary was generated by AI from the outlets' reporting listed below. It is not independently verified and may contain errors — check the original sources. How BrevFeed works →

The daily brief

One email each morning: the day's tech stories, clustered across outlets and summarized. No account needed.

One email a day. Unsubscribe in one click, any time.

Today's brief

Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.

~7 min · 6 stories · Aug 15

▶ Play today's brief Listen on Spotify

New every morning, and the back catalogue is archived by date.

Reporting from

Jane Street has released Bonsai, a UI library for building performant, reactive web applications using OCaml. This library allows developers to use the same language for both frontend and backend, potentially simplifying large web application development.