News for hackers. Stuff that matters.
Re:Advice for the next 100 Rust GUIs by swiftcoder on Sunday November 22, 2026 @03:05AM (#50597328)
> You really want a video playing in a hardware accelerated layer when possible, and on low end devices it’s the only hope for getting smooth frame rates

The other issue in this bucket is being able to embed a 3D rendering context into the UI.

None of the native rust UI toolkits I tested at the time supported this, and I ended up using Tauri -> HTML-Canvas -> WebGL for what ought to be a native app.

Re:Advice for the next 100 Rust GUIs by slopinthebag on Sunday November 22, 2026 @03:11AM (#50597366)
the frameworks with wgpu backends can do this pretty trivially.

you can even use egui with bevy and have an entire game engine.

Re:Advice for the next 100 Rust GUIs by swiftcoder on Sunday November 22, 2026 @03:21AM (#50597434)
> you can even use egui with bevy and have an entire game engine.

Indeed, but I specifically don't want an entire game engine. I want a UI with an embedded 3D view.

Dealing with subpar clones of the whole text rendering, IME, and accessibility stacks just to get an embedded 3D view is not worth.

Re:Advice for the next 100 Rust GUIs by slopinthebag on Sunday November 22, 2026 @05:47AM (#50598360)
well like i said, you can use something like egui's wgpu backend (which is the default) and draw whatever 2d or 3d graphics you want.
Re:Advice for the next 100 Rust GUIs by swiftcoder on Sunday November 22, 2026 @06:51AM (#50598764)
Right, but going that route gives up native text layout, native IME, native accessibility, etc. It's mostly fine for building game-like things, but I wouldn't want to build a productivity app that way.
Re:Advice for the next 100 Rust GUIs by the__alchemist on Sunday November 22, 2026 @07:38AM (#50599127)
I don't know what you're asking. I use EGUI + WGPU for a 3D molecule viewer/editor, and it works great. I don't know what a productivity app is, but I think this is one?
Re:Advice for the next 100 Rust GUIs by swiftcoder on Sunday November 22, 2026 @07:56AM (#50599284)
> Many people pointed out that you have a big selection of tools that can do this.

The vast majority have pointed to tools that do the opposite: they render the UI into my 3D context, not tools that can render my 3D context into their UI.

This is a fundamentally different approach, with significant tradeoffs: you are accepting non-native controls, text layout, IME, accessibility, no direct compositor integration, and re-renders affect the entire UI (not just the 3D viewport).

Re:Advice for the next 100 Rust GUIs by the__alchemist on Sunday November 22, 2026 @08:06AM (#50599348)
Ah got it; I appreciate the clarification. That was indeed the part I'd missed.
Re:Advice for the next 100 Rust GUIs by slopinthebag on Sunday November 22, 2026 @07:55AM (#50599274)
what do you mean by "native text layout, native IME, native accessibility"? egui does text layout, accessibility, etc. if you mean like using the os-native UI, tauri doesn't give you that either...
Re:Advice for the next 100 Rust GUIs by swiftcoder on Sunday November 22, 2026 @07:58AM (#50599297)
> if you mean like using the os-native UI, tauri doesn't give you that either

The browser shell offers a mature text engine, native IME integration, robust accessibility support, access to a wide selection of controls that behave exactly like their native equivalents, and the canvas element is distinct from the rendering model of the surrounding UI elements.

It's not a panacea, but its significantly more advanced than something like egui.

Re:Advice for the next 100 Rust GUIs by slopinthebag on Sunday November 22, 2026 @08:07AM (#50599358)
the browser has it's strengths and weaknesses, if it works for your usecase than great. but i thought we were talking about embedding 3d context into rust ui :)
Re:Advice for the next 100 Rust GUIs by swiftcoder on Sunday November 22, 2026 @10:44AM (#50600696)
> i thought we were talking about embedding 3d context into rust u

I would rather be doing that, yes. The options to do that without moving all my UI into the 3d context are however slim

Re:Advice for the next 100 Rust GUIs by gen2brain on Sunday November 22, 2026 @06:00AM (#50598443)
You can check my IUP fork here https://github.com/gen2brain/iup-go , with many drivers/backends for the native controls. And they all have Canvas and GLCanvas controls. Well, maybe not modern, but still the only easy cross-platform API to handle different platforms with more or less the same codebase.

And of course, no need to use Go, you can use C, there is a nice wrapper for C++. You can also build IUP.xcframework and use Swift if you like, and there is a bindgen example that can generate Lua and Python bindings, or can export API model as JSON so you can generate whatever bindings. Simple C API based on IUP and attributes, but very poverfull. Nice docs and 200+ examples, retained, standard events and callbacks, should be easy to start and fast to build native apps everywhere.

Re:Advice for the next 100 Rust GUIs by simonask on Sunday November 22, 2026 @03:42AM (#50597525)
It's because it is an unbelievably difficult and quite finicky thing to support, especially if the 3D canvas uses a different rendering API than the UI framework itself.

For example, say your UI is drawn with OpenGL, but you need an embedded Vulkan canvas. This takes a huge amount of API-specific code passing API-foreign texture handles and synchronization objects between contexts. You need to do this for every possible combination of APIs, and it's not symmetrical (hosting Vulkan within OpenGL is different from hosting OpenGL within Vulkan).

Every desktop-class rendering API does have extensions for dealing with foreign APIs, but it's a lot of work, to the point where rendering into shared memory from a subprocess is sometimes the most viable option.

Re:Advice for the next 100 Rust GUIs by swiftcoder on Sunday November 22, 2026 @04:13AM (#50597705)
> especially if the 3D canvas uses a different rendering API than the UI framework itself

See this is high on the list of things I do not want. I don't want my UI rendered from scratch in OpenGL, I want it drawn using the native widget API, which already supports embedding 3D canvases.

This is one of those things that is completely trivial in, say, Cocoa, but arbitrarily hard in most cross-platform UI toolkits.

Re:Advice for the next 100 Rust GUIs by simonask on Sunday November 22, 2026 @08:21AM (#50599460)
Sure, but that's just because Apple already did the work, and they only have to support Metal and to a limited extent OpenGL anyway.

On a Windows desktop, you have D3D11 and below, D3D12, Vulkan, and OpenGL. I believe you can do most of it if you're using GDI, but even Microsoft's own myriad of UI frameworks have spotty support.

Re:Advice for the next 100 Rust GUIs by speedstyle on Sunday November 22, 2026 @08:58AM (#50599778)
Windows users do not want you to use the system API (most preinstalled apps don't) and Linux users don't have one.
Re:Advice for the next 100 Rust GUIs by ogoffart on Sunday November 22, 2026 @05:11AM (#50598080)
Slint can do that. You can render with wgpu or OpenGL into a texture and show it as an Image. There are examples for wgpu, OpenGL and Bevy in the repository.
Re:Advice for the next 100 Rust GUIs by nicoburns on Sunday November 22, 2026 @07:34AM (#50599067)
Which ones did you test? My framework Dioxus Native allows this. I believe Iced, Slint, and egui all do too. Which is all of the most popular frameworks except GPUI.
Re:Advice for the next 100 Rust GUIs by the__alchemist on Sunday November 22, 2026 @07:37AM (#50599107)
EGUI + WGPU works well.
Re:Advice for the next 100 Rust GUIs by samiv on Sunday November 22, 2026 @02:24PM (#50602980)
You don't embed a 3D rendering context but rather you have a render target (surface) integration such as being able to share a resource such as a window handle for rendering into with OpenGL