Bonito 5.0 is out, a big release focusing on stability and performance.
Most of the work went into networking, session handling and serialization. Talking to the browser is now noticeably faster and more stable.
- Performance. HTTP/2 transport plus a reworked serialization protocol. ~3× WebSocket throughput, ~2.8× faster serialization on large payloads with a fraction of the allocations. Under load with many concurrent connections, ~30× more updates/sec than 4.2. Benchmarks in the blog post.
- New docs system. A drop-in replacement for a Documenter build: keep your existing
make.jland markdown, swap informat = Bonito.DocumenterBonito(), and the whole site is rendered by Bonito. VitePress-style theme, search, version switcher and an (experimental) blog with RSS. The linked blogpost and new Bonito docs are build with it! - BonitoWidgets.jl. New companion package: tabs, resizable splits, collapsibles, floating windows, a VSCode-style
Workspace. Panels stay mounted, so a WGLMakie figure keeps its WebGL context and camera through any layout change. - Dark-mode-aware widgets. Built-ins follow the OS light/dark setting and can be restyled via CSS variables.
- Remote apps. Drive an app running in one Julia process from another. Groundwork for remote BonitoBook workers.
Under the hood: Session split into RootSession + sub-sessions (finalizers replaced with refcounting), a single error boundary that surfaces render/init errors instead of killing the session, KeyedList, ANSI + CommonMark terminal output, asset-server range requests and caching, plus a lot of reconnect/race/thread-safety fixes and new tests.
Requires Julia 1.11 and HTTP.jl 2.4. Session/SubConnection internals changed.
Full write-up and benchmarks: Bonito 5.0 | Bonito
Thanks to ReynKo for funding a big part of this.
Stay tuned for new updates to BonitoBook, WGLMakie compile time improvements, and WASM support, which I plan to release in the coming weeks!