The Spectrum Dispatch News

technology

Blender's UI Library Now Available as Standalone Cross-Language Runtime

A new library decouples Blender's interface code for use in Python, Rust, JavaScript, C, and other languages, offering faster startup and lower memory usage.

Blender's UI Library Now Available as Standalone Cross-Language Runtime

A new open-source project called BUI extracts Blender’s user interface as a standalone library, making its widgets and interaction patterns available to applications written in multiple programming languages.

Blender’s UI Library Now Available as Standalone Cross-Language Runtime

According to the project documentation, BUI provides access to Blender’s UI through bindings for Python, Rust, JavaScript, C, C++, and Dear ImGui. The library includes a small C-based runtime that manages widget trees, handles input, manages layout, and performs drawing using either CPU or GPU rendering.

The project claims performance advantages over some existing UI frameworks. According to benchmarks mentioned in the documentation, BUI delivers 2–4× less CPU per frame than gpui-fast, with reduced RAM usage and approximately 5 millisecond first-frame startup time. An idle UI consumes 0% CPU through damage rendering, which only redraws changed widgets.

The interface preserves Blender’s interaction model, which the documentation describes as particularly efficient for artists. This includes features like hidden cursor dragging in number fields, mathematical expression evaluation in input boxes, press-drag-release menus, and fuzzy search in menu selection. The library supports both Blender’s dark and light themes and can be switched at runtime.

BUI supports multiple approaches to building interfaces. Users can write tkinter code unchanged and have it rendered with Blender’s visual style. It offers Qt-style Python syntax, direct access to 45 native Blender widgets and editors, and Rust support using either HTML-like markup with rsx! or gpui-compatible syntax. JavaScript and React developers can use a DOM-like API or JSX on Node.js or Bun.

The library includes comprehensive widget support, including number fields with precision controls, color wheels, curves, node editors, file browsers, and text areas. Text rendering uses Blender’s Inter font embedded with FreeType, and the project supports decoding multiple image formats including PNG, JPEG, WebP, and SVG.

According to the documentation, BUI does not require Blender to be installed and is not a browser or webview—despite supporting HTML and CSS as UI languages in some bindings, no browser engine is involved. Full documentation is available at bui.preetham.top.

Key facts

  • BUI decouples Blender’s UI code into a library callable from Python, Rust, JavaScript, C, C++, and Dear ImGui
  • The project claims 2–4× lower CPU usage per frame than gpui-fast with ~5ms first-frame startup
  • Idle UIs consume 0% CPU through damage rendering that only redraws changed widgets
  • The library includes 45 native Blender widgets and preserves Blender’s interaction patterns like hidden-cursor dragging and fuzzy menu search
  • No Blender installation required; users can write tkinter code unchanged and have it rendered in Blender’s style

Sources

← All posts