noesis_runtime
Rust bindings for the Noesis GUI Native SDK, which brings XAML-driven UI to game engines. You load .xaml scenes, drive the View and renderer, implement a RenderDevice against your own GPU, and write Rust-backed custom controls and markup extensions that XAML can use by name.
The crate is renderer-agnostic. It's built for Dead Money's own game projects and was mostly written by AI agents under human direction.
You need a Noesis license
This crate links against the Noesis Native SDK, closed-source commercial software from Noesis Technologies S.L. We don't redistribute it. Buy it separately and point NOESIS_SDK_DIR at your install; the build script reads it at compile time and links libNoesis from the matching Bin/<platform>/ directory.
Set NOESIS_LICENSE_NAME and NOESIS_LICENSE_KEY to apply your license. Without them the runtime works for a while, then blanks the view with a "Trial expired" message.
Quick start
[]
= "0.9"
The crate is on crates.io, but it still links the Noesis SDK at build time. You need NOESIS_SDK_DIR set (see above) for it to compile.
use ;
use ;
// Implement a XAML provider against your asset pipeline.
;
// Once per process.
init;
// Install the provider. The returned guard owns the registration;
// drop it to clear the global slot.
let provider = MyXaml;
let _guard = set_xaml_provider;
// Load a scene, create a view, and drive it from your frame loop.
let element = load
.expect;
let mut view = create;
view.set_size;
view.activate;
loop
shutdown;
Custom controls
use ;
use ;
let mut b = new;
b.add_property;
b.add_property;
// ...
let _registration = b.register.expect;
// XAML with `xmlns:my="clr-namespace:MyNs"` can now use `<my:NineSlicer/>`.
Custom markup extensions
use MarkupExtensionRegistration;
let table = from;
let _registration = from_closure.expect;
// `{my:Loc menu.greeting}` in XAML now resolves to "Hello, world!".
How it works
- Hand-written C ABI, no bindgen. Noesis's C++ API (templates, intrusive
Ptr<T>, pure-virtual hierarchies) is a poor fit for bindgen, so the binding is a narrow C ABI hand-written incpp/noesis_shim.{h,cpp}and mirrored insrc/ffi.rs. Noesis types stay opaque on the Rust side; only#[repr(C)]POD structs cross the boundary, and each one's size is checked at compile time, so an SDK update that reshapes a struct fails the build instead of producing garbage. - RAII registration guards. Every "install something global" call (
set_xaml_provider,subscribe_click,register_class) hands back a guard that clears the registration when dropped. Drop order matters; the per-module docs spell out the contract. - Custom controls via trampoline subclasses. The shim's
RustContentControlandRustMarkupExtensionreport a syntheticTypeClassper name and forward virtuals likeOnPropertyChangedandProvideValueto your Rust callback, the same shape Noesis's own C# and Unity bindings use. - Single-threaded. Noesis isn't thread-safe. The view, renderer, and input pump all run on one rendering thread. The guards are
Send, so you can move resources between threads, but the calls themselves stay on that thread.
Custom pixel shaders (BrushShader / ShaderEffect) are out of scope. They need compiled shader bytecode and a live render device to do anything, which the crate's headless FFI surface can't provide. The Batch::pixel_shader pointer round-trips through the render device, but there's no way to author one here.
For the rest of what the SDK can't do, or does differently from WPF, see SDK limitations.
Building
Optionally apply your license credentials (see above):
tests/lifecycle.rs calls init, version, and shutdown and checks for a non-empty version string. Building with --features test-utils unlocks tests/render_device.rs, the full render device regression test.
Licensing
Source in this repository is © 2026 Dead Money LLC and is distributed under the MIT License. Everything under cpp/, src/, and tests/ is original work. No Noesis SDK code is vendored or translated; it's only #include'd at compile time from NOESIS_SDK_DIR.
The Noesis Native SDK is not part of this repository and is not redistributed here. You obtain it from Noesis Technologies under their EULA. Use and distribution of any binary you build that links against the SDK is governed by that EULA, not by the MIT License above.
Acknowledgements
Built on Noesis Technologies' Native SDK. The Noesis documentation is the source of truth for XAML behavior, control templates, and bindings. Report SDK bugs there; report bugs in this wrapper here.