Dogukan Sar

ShippedImmediate-mode GUISeptember 2026

Tacita

An immediate-mode GUI whose core has no operating system and no GPU in it.

Rust · no_std · D3D11 · D3D12 · wgpu · C++ FFISource

The problem

Most GUI libraries assume they own the window, the device, and the frame. Embed one inside a host that already owns all three, such as a tool drawing through a host application’s swap chain, or a target with no operating system at all, and the assumptions fight you at every step.

Tacita’s core is #![no_std], built on core and alloc with no C runtime, and it never touches a GPU or an OS API. The host feeds it a snapshot of input each frame, declares the interface with flat calls, and takes back vertex, index, and command lists to draw with whatever renderer it brought.

Architecture

The host’s input layer translates raw events into a per-frame InputState. The adapters/win32 crate does this for Win32 messages without any unsafe and without calling into Win32 itself. The core consumes that state, runs widgets, layout, ID management, capture and z-order, rasterises text and shapes into coverage masks, and emits DrawData. Backends for D3D11 and D3D12 turn DrawData into draw calls against a device and swap chain the host owns; a wgpu harness is the reference backend for development.

Two more entry surfaces sit beside the core: a flat Gui facade in sdk, and an extern "C" layer in ffi with a hand-written C++ header. A two-sided consistency guard keeps the header and the Rust structs in lockstep, so a layout change on either side fails the build rather than corrupting memory at runtime.

Widgets and rendering

Windows, tabs, collapsing headers, scroll regions, checkboxes, sliders, buttons, text inputs, combo boxes, an HSV colour picker, keybind selectors, tooltips, and icon fonts merged into the same atlas as text.

Anti-aliasing is analytic: exact pixel coverage in the AGG and FreeType lineage, rasterised once and cached as masks in the font atlas. After warm-up, a steady-state frame allocates nothing.

Verification

  • More than 400 core tests covering widget logic, capture and z-order semantics, layout, and the zero-allocation guarantee, which is enforced by a counting allocator rather than assumed.
  • Headless GPU tests on real hardware for both D3D11 and D3D12. Frames are rendered, read back, and asserted pixel-exact.
  • An MSVC-compiled C++ consumer exercising the FFI surface.
  • The no_std gate: the core builds for x86_64-unknown-none.

Status

Feature-complete and in use: the full widget set, both native backends, the C++ FFI, and the Win32 adapter are shipped and verified. The API surface may still shift. IME and CJK input and multi-viewport support are on the list, pulled by real use rather than a roadmap.