Noesis for Rust & Bevy
Posted: 29 Jun 2026, 23:33
I have cleaned up and published an engine-agnostic rust runtime for the Noesis SDK: https://github.com/dead-money/noesis_runtime
No Noesis SDK code is vendored or translated; it's only #include'd at compile time from NOESIS_SDK_DIR.
I suspect this will not be super interesting to the Rust community, who prefer free, MIT-licensed solutions for everything, but anyone who has an interest in Rust and who owns a Noesis license can use this SDK runtime. It has an extremely high degree of SDK coverage.
Rust example:
The second part of this are bridges for the Bevy engine: https://github.com/dead-money/noesis_bevy
Again, I doubt the Bevy community will be enamored by this, but I like using it. Xaml doesn't quite afford itself to an ECS model, so this bridge doesn't do that. Instead, each view is an entity that provides fairly ergonomic access to the Noesis XAML tree from Bevy systems.
The Bevy bindings are mostly complete, a couple things are missing, but the "Scoreboard" demo is about 95% there (just the initial fade-in needs a feature I haven't ported yet). I plan to provide bevy idiomatic versions of other Noesis samples, although you must own the SDK to build and run them since these repos do not contain any SDK assets or code.
Bevy example:
Screenshots aren't super interesting because they look exactly like you'd expect from Noesis!
No Noesis SDK code is vendored or translated; it's only #include'd at compile time from NOESIS_SDK_DIR.
I suspect this will not be super interesting to the Rust community, who prefer free, MIT-licensed solutions for everything, but anyone who has an interest in Rust and who owns a Noesis license can use this SDK runtime. It has an extremely high degree of SDK coverage.
Rust example:
Code: Select all
use noesis_runtime::view::{FrameworkElement, View};
use noesis_runtime::xaml_provider::{set_xaml_provider, XamlProvider};
// Implement a XAML provider against your asset pipeline.
struct MyXaml(std::collections::HashMap<String, Vec<u8>>);
impl XamlProvider for MyXaml {
fn as_any_mut(&mut self) -> &mut dyn std::any::Any { self }
fn load_xaml(&mut self, uri: &str) -> Option<&[u8]> {
self.0.get(uri).map(Vec::as_slice)
}
}
// Once per process.
noesis_runtime::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(provider);
// Load a scene, create a view, and drive it from your frame loop.
let element = FrameworkElement::load("MainMenu.xaml")
.expect("XAML failed to parse");
let mut view = View::create(element);
view.set_size(1920, 1080);
view.activate();
loop {
// Forward input to view.mouse_*, view.key_*, view.touch_*
let _changed = view.update(time_seconds);
// Your renderer drives view.renderer().
}
noesis_runtime::shutdown();Again, I doubt the Bevy community will be enamored by this, but I like using it. Xaml doesn't quite afford itself to an ECS model, so this bridge doesn't do that. Instead, each view is an entity that provides fairly ergonomic access to the Noesis XAML tree from Bevy systems.
The Bevy bindings are mostly complete, a couple things are missing, but the "Scoreboard" demo is about 95% there (just the initial fade-in needs a feature I haven't ported yet). I plan to provide bevy idiomatic versions of other Noesis samples, although you must own the SDK to build and run them since these repos do not contain any SDK assets or code.
Bevy example:
Code: Select all
use std::sync::Arc;
use bevy::prelude::*;
use noesis_bevy::{NoesisCamera, NoesisPlugin, NoesisView, XamlRegistry};
const MENU_XAML: &str = r#"<Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<TextBlock Text="Hello, Noesis!" Foreground="White"
HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Grid>"#;
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_plugins(NoesisPlugin::default())
.add_systems(Startup, setup)
.run();
}
fn setup(mut commands: Commands, mut xaml: ResMut<XamlRegistry>) {
// Register XAML by URI. For real projects, load .xaml files through the
// asset server instead; the loader feeds the same registry.
xaml.insert("menu.xaml", Arc::new(MENU_XAML.as_bytes().to_vec()));
// A view is a `NoesisView` component on a 2D camera tagged `NoesisCamera`.
// Noesis renders the scene offscreen and composites it onto that camera.
commands.spawn((
Camera2d,
NoesisCamera,
NoesisView {
xaml_uri: "menu.xaml".to_string(),
size: UVec2::new(1920, 1080),
..default()
},
));
}