deniz.in

Markets

Weather

Loading weather

· via Hacker News – Front Page (native)

Blender's UI decoupled into a fast standalone library for Python, Rust, JS and C++

BUI extracts Blender's widget drawing and interaction rules into a small C runtime with bindings for Python, Rust, JavaScript, C++ and Dear ImGui, and reports 2-4x less CPU per frame than gpui-fast.

Blender's UI decoupled into a fast standalone library for Python, Rust, JS and C++

An open-source project called BUI has pulled Blender's user interface out of the 3D application and repackaged it as a standalone GUI library. According to the project's README, which reached the Hacker News front page on 6 November, the library exposes Blender's widgets and interaction model to Python, Rust, JavaScript/React, C, C++ and Dear ImGui — and its own benchmarks report a fraction of the CPU cost of GPUI, one of the newer GPU-accelerated UI frameworks.

What BUI is

At the core of BUI is what the README calls "the kit": a compact C runtime that owns a single widget tree, performs layout, processes mouse and keyboard input, and draws the interface. The drawing code is a C port of Blender's widget-drawing source, interface_widgets.cc, and interactions follow Blender's own rules. Thin bindings sit on top, so higher-level languages construct the tree and handle callbacks while layout, input and rendering stay in native code on the CPU or GPU.

The project is explicit about what it is not. It is not Blender — no installation of, or familiarity with, the 3D suite is required. It is also not a browser: although the Rust and JavaScript APIs describe interfaces in HTML and CSS, there is no browser engine, webview or network stack underneath.

The Blender feel, preserved

Much of the pitch rests on interaction details artists know by muscle memory. Number fields can be dragged with a hidden, continuous cursor so values keep changing even after the pointer would have run out of screen; Shift adds precision and Ctrl snaps. Fields double as calculators, accepting expressions such as 2*pi or min(4, 3) through Blender's own evaluator. Menus support fuzzy search — the README's example is typing "ad cu" to find "Add Cube" — with tolerance for typos and recent picks ranked first. Pie menus, dragging across a column of checkboxes, undo on every UI edit, an HSV colour wheel, curves, a node editor and Blender's file browser are all included, along with dark and light themes switchable at runtime.

In total, the Python components API exposes 45 native Blender widgets, editors and templates, ten of which are also reachable from Rust and JavaScript.

Many entry points

Existing tkinter programs can run unchanged: the README claims coverage of all 7,846 public names in tkinter and ttk, with nine real programs behaving identically on the standard library and on BUI. A Qt-style Python API covering the common subset of Qt widgets is present but marked partial.

For Rust, BUI presents itself as a web-like framework: all 113 HTML elements, modern CSS including flexbox, grid with named areas, nesting, @container and color-mix(), Tailwind CSS v4, HTML-like markup macros, React-style hooks, and even a gpui-compatible syntax. The crate ships on crates.io as blenderui. JavaScript and React run on Node.js or Bun through napi-rs, offering either a DOM-like API or JSX, with React's hooks backed by signals. Dear ImGui can run unchanged on BUI windows rendered in Blender's theme, or in a build where ImGui's widgets are replaced by Blender's. A plain C header, BUI_kit.h, exposes the kit directly; a Go-flavoured entry point is listed as not yet available.

Performance claims, in context

BUI's efficiency argument rests on damage rendering: an idle interface consumes no CPU, and a hover redraws only the affected widget. An optional GPU renderer — Direct3D 11 on Windows, OpenGL 3.3 on Linux — is modeled on Blender's instanced widget drawing and reportedly produces the same pixels as the CPU rasterizer.

The README's benchmark section reports 2–4× less CPU per frame than gpui-fast, lower memory use and a first frame in roughly 5 milliseconds, which underpins the Hacker News title's claim that the toolkit is "much faster than GPUI". These are the project's own figures, and the README invites readers to run the benchmarks themselves rather than take the numbers on faith.

Why it matters

Desktop GUI development has been consolidating around the browser, via stacks like Electron and webviews, or around young native frameworks still maturing. BUI proposes a third path: an interface layer refined by a large professional user base over decades, suddenly usable from the languages people already write. For maintainers of aging tkinter tools it is potentially a drop-in facelift; for Rust and React developers it promises native windows without shipping a browser. The caveats are genuine — benchmarks are self-reported, binding completeness ranges from "complete" to "working" to "partial", and the project is young — but recycling a battle-tested UI as general-purpose infrastructure is an idea worth watching.

  • #blender
  • #gui-toolkit
  • #open-source
  • #python
  • #rust

Related posts