News for hackers. Stuff that matters.
Re:Tauri: An Electron alternative written in Rust by devwastaken on Friday February 19, 2021 @01:27PM (#26196223)
Webviews don't work because they solve very different problems.

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.

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.
Re:Tauri: An Electron alternative written in Rust by saagarjha on Saturday February 20, 2021 @05:02AM (#26203039)
Presumably, if copying some data between JavaScript and native code in a slightly roundabout way was an issue, you wouldn't run things through web technology in the first place…
Re:Tauri: An Electron alternative written in Rust by innocenat on Saturday February 20, 2021 @11:05PM (#26210702)
If you pass data with ArrayBuffer it's non-copying, so even large data is fine.