affineui
Safe, idiomatic Rust bindings for AffineUI — a tiny GPU-accelerated HTML/CSS UI renderer for tools and game engines.
EXPERIMENTAL preview — published for early testing; APIs and the underlying C ABI will change while AffineUI is pre-1.0.
Two modes:
- App-owned — AffineUI owns the window and main loop:
use ;
let view = new;
view.build;
let app = new;
app.load_view;
app.run;
- Embedded — your engine owns the GPU device, loop, and input;
AffineUI renders into your render targets (
affineui::embedded::Ui, D3D11 / Metal / GL / WebGPU handles).
Native library
This crate drives the affineui_c shared library and does not ship
it. Build it from the AffineUI repo
(cmake -DAFFINEUI_BUILD_C_SHARED=ON, target affineui_c) and set
AFFINEUI_LIB_DIR to the output directory; in a repo checkout the
build script finds it automatically and copies it next to your
binaries.
Everything is single-threaded by contract (handles are !Send);
callbacks are released exactly once and panics never cross the FFI.