Re:Tauri: An Electron alternative written in Rust
by andrew_ on Friday February 19, 2021 @01:34PM
(#26196302)
It's been a minute since I attempted it on Windows, but transparency of borders and borderless windows with the webview on Windows was next to impossible. It's one of the reasons we used Electron. I'm curious to know if they've solved that, but can't find my mention of it.
Re:Tauri: An Electron alternative written in Rust
by saagarjha on Friday February 19, 2021 @08:41PM
(#26200581)
If you cared about performance, would you really be using Electron?
Re:Tauri: An Electron alternative written in Rust
by innocenat on Friday February 19, 2021 @08:54PM
(#26200696)
Yes. Why not? HTML/CSS great (from the development POV) for UI, and I can always write the performance critical code in C and linked them to the electron HTML/CSS frontend.
System webviews will always have different features, break things, and are entirely uncontrollable by the software distributor. This means your software will not be resilient to the future.
You cannot access the JS engine the same as you can V8 in most webviews. This means you can't interop with C libraries without some performance destroying hack like copying everything into the JS space through sockets.
This also means something as simple as reading a file has to, again, cross the sandbox in an inefficient way. You'd have the browser, it's javascript engine, and your own runtime in node or python or however too.
Electron develops patches that make chromium more performant and feature ready for desktop.
Electron conjoins the chromium and node v8 event loop to take advantage of libuv - again a performance improvement.
The decision of webviews and electron is based on what you're trying to do. If it's simple html/JS that's pretty much self contained then sure.