Re:Tauri Mobile – Develop Mobile Apps with JavaScript and Rust
by dindresto on Wednesday March 01, 2023 @08:20AM
(#34982066)
I noticed the Dioxus page about desktop support with Tauri mentioning that this won't allow access to any Web APIs, like WebGL or WebGPU. This made me wonder: Is it possible to embed a native view inside of the webview rendered by Tauri? To be precise, could we make use of the native wgpu crate to embed a 3D rendered scene inside Tauri?
[ Parent
| on HN ]
Re:Tauri Mobile – Develop Mobile Apps with JavaScript and Rust
by dindresto on Wednesday March 01, 2023 @08:25AM
(#34982099)
Looks like someone attempted this last year, without any success unfortunately: https://github.com/dceddia/wgpu-tauri-experiment
Re:Tauri Mobile – Develop Mobile Apps with JavaScript and Rust
by terhechte on Wednesday March 01, 2023 @08:47AM
(#34982320)
Yeah that works, because you get access to the native window. I'm adding native macOS elements to the Ebou window, for example. I'm also adding native window effects. You could reasonably easy add a wgpu native view I guess. What's a bit more difficult would be to have it position correctly (because you'd need to know the locations of the html elements, and you can only query them via the `eval` js routine, but that would also work).