Blender's GPU Accelerated UI, Decoupled from it's original codebase. Supports Rust, Python, JS, React, C & C++. Twice as good as GPUI
Contributing to BUI
Thanks for helping! Bug reports, missing tkinter/Qt behavior, CSS features, platform hosts, docs and examples are all welcome.
Before you start
- Bugs and features: open an issue first, so we can agree on the approach.
- Security problems: report them privately (see SECURITY.md).
- Be kind: this project follows the Code of Conduct.
Setting up
git clone https://github.com/ppmpreetham/BUI && cd BUI
cmake -S . -B build && cmake --build build
ctest --test-dir build --output-on-failure # C and Python suites
cd bindings/rust && cargo test # Rust crates
You need CMake ≥ 3.20, a C11 / C++20 compiler (on Windows, MSYS2 MinGW is the
tested toolchain for the Python build), Python 3.11+, and on Linux the X11
headers (libx11-dev / libX11-devel). More detail:
docs/getting-started.md.
Where things live
| You want to change | Look in |
|---|---|
| Widget drawing, input, layout, rendering | kit/ (C), gpu/ (raster, GPU, text) |
| tkinter / Qt behavior | bindings/python/bui/tksyntax/, bindings/python/bui/qtsyntax.py |
| Components | bindings/python/bui/components/ |
| Rust: CSS, layout, hooks | bindings/rust/blenderui/src/ |
Rust: rsx!, #[component], tw! |
bindings/rust/blenderui-macros/src/ |
| Tailwind utilities and variants | bindings/rust/blenderui-tailwind/src/lib.rs |
| JavaScript and React | bindings/node/, bindings/react/, bindings/rust/blenderui-node/, bindings/rust/blenderui-jsview/ |
| Dear ImGui backend, bindings, Blender widgets | bindings/imgui/ (bindings are generated by bindings/imgui/gen/gen.py) |
| Themes | tools/gen_theme.py (generates kit/intern/kit_theme_presets.c from Blender's presets) |
| Docs | README.md, docs/, and the website in website/ (https://bui.preetham.top) |
ARCHITECTURE.md explains the module boundaries.
Pull requests
- Keep each PR focused on one change, and add a test for it:
- C:
ctest. - Python:
bindings/python/tests/. For tkinter behavior, add to the side-by-side compat suite. - Rust:
bindings/rust/blenderui/tests/. - JavaScript:
bindings/node/test/andbindings/react/test/.
- C:
- Don't let performance regress. The test suite enforces frame budgets. For
rendering or layout changes, run the benchmark in
bindings/rust/bench/and include before and after numbers. - Keep the SPDX header (
GPL-2.0-or-later, the one Blender's files carry) in new files. Contributions are accepted under BUI's license, the GNU GPL version 3 or later. - Update
CHANGELOG.md(the Unreleased section) and the relevant guide indocs/. - Code style: follow the surrounding code. C is formatted like Blender's
sources, and Rust with
rustfmtdefaults (max width 120).