News for hackers. Stuff that matters.
Re:Tauri Mobile – Develop Mobile Apps with JavaScript and Rust by sljsdljfslkj on Wednesday March 01, 2023 @08:15AM (#34982024)
> but its the Javascript that causes it to crawl

If it's updating a web view then it needs to go through javascript. The fastest rust wasm frameworks are not faster than javascript by any meaningful amount.

Re:Tauri Mobile – Develop Mobile Apps with JavaScript and Rust by dindresto on Wednesday March 01, 2023 @08:21AM (#34982075)
This is actually wrong in this context. Rust is running natively here (so no WebAssembly), directly manipulating the DOM of the web view without having to go through JavaScript glue code.
Re:Tauri Mobile – Develop Mobile Apps with JavaScript and Rust by fastball on Wednesday March 01, 2023 @08:45AM (#34982298)
How is Rust manipulating the DOM?
Re:Tauri Mobile – Develop Mobile Apps with JavaScript and Rust by terhechte on Wednesday March 01, 2023 @09:58AM (#34983086)
It uses IPC to give the WebView patches of what to do. There is a wee bit of JS there that parses the IPC and applies the patch to the DOM.

Here's the code: https://github.com/DioxusLabs/dioxus/tree/master/packages/in...

Re:Tauri Mobile – Develop Mobile Apps with JavaScript and Rust by lucasyvas on Wednesday March 01, 2023 @10:09AM (#34983190)
This explains how Dioxus also has a LiveView mode - that sounds exactly how LiveView works.
Re:Tauri Mobile – Develop Mobile Apps with JavaScript and Rust by fastball on Thursday March 02, 2023 @02:12AM (#34992967)
So is my parent wrong and my grandparent correct? Because that is what I thought as well. DOM mutations are still happening via JS, so while the business logic might be in Rust, the mutations are still bounded by the speed of JS.
Re:Tauri Mobile – Develop Mobile Apps with JavaScript and Rust by demonthos on Friday March 03, 2023 @12:23PM (#35012505)
DOM mutations still happen in JS, they are just send from native-rust code. It is exactly like a liveview with a local server + webview wrapper
Re:Tauri Mobile – Develop Mobile Apps with JavaScript and Rust by survirtual on Wednesday March 01, 2023 @08:50AM (#34982343)
I think this would be very situational even in the case of WASM. Without needing a garbage collector and using only a JS buffer for message handling and DOM updates, for a long running application, there might be performance gains that would be hard to directly measure. With simple examples, the JS will generally win handedly. But for more complex apps that use more / increasing memory and perform involved state manipulation, I’m willing to bet you’d see the favor slip.

This manifests as a snappier experience with less / no GC pauses and a clearer dev experience with a better separation between domains. Rust is just a better language to work with, so it has a certain future-proof quality to it that would pay dividends long term compared to JS in any case.