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.
[ Parent
| on HN ]
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.