Any true alternatives to electron JavaScript?
15 points by dhruvp
15 points by dhruvp
I see companies having codebase in Tauri going back to electron - is this a common thing?
Where do you see this and do they have any posts about why?
At Unison we moved from Tauri to Electron primarily because Tauri doesn't offer reliable rendering between platforms. Even within versions of macOS, the webview used can differ wildly and it is nearly impossible to load up old versions of macOS to test in. Additionally the linux webview that Tauri uses (WebkitGTK) has a series of performance issues.
Tauri is working on a solution to this here: https://github.com/tauri-apps/tauri/issues/14963
Edit: spelling and grammar mistakes
This cannot be serious.
Some people have been writing web applications that render consistently for literally decades, across the most bizarre mix of browsers and rendering engines.
But somehow the people who thought that using an embedded web view would be a good option for making local apps, are also unable to achieve satisfactory consistency between versions of the same rendering engine?
I think I can see the real issue here, and it's nothing to do with the rendering engine.
I would suggest that maybe they should just try the platform native UI toolkits available, but let's face it, if HTML and CSS are too much for these people, just suggesting they build actually native apps is likely to result in some kind of PTSD.
Oh and here's a free tip: it's not hard at all to load up old versions of macOS. It's called a virtual machine. Again - some people have been using these to test in alternative browser versions, for literally decades.
https://x.com/brendonovich/status/2045114479244165151?s=46lec
here they discuss about moving from Tauri to electron.
I'm a little confused by this. Because I value platform native experiences and low-footprint software, Electron has never been an option I even considered. It is very strange to ask if there are "true alternatives" to things that a great many people consider non-options in the first place. But to answer your question, just build apps using the native toolkits. If you want to be cross platform, build your core in a modular way and then wrap it in platform-appropriate GUIs. A great example of this is Ghostty, which feels at home on both macOS and Linux.
Could you expand on what you mean by
build your core in a modular way and then wrap it in platform-appropriate GUIs
If your app does something complicated, this can be done in a library. This library exposes an API that you can then call from a platform specific GUI layer. This is what I intended to elucidate by referring to Ghostty, as a particularly good citizen that manages to be cross platform.
just build apps using the native toolkits
When somebody says "Just do ..." it's usually a pretty good indicator they don't know what they are talking about.
Building cross-platform applications using native toolkits is anything but trivial. This is especially true for more complex applications as you'll inevitably run into a particular platform's toolkit not supporting XYZ, requiring you to implement things yourself. Probably the most notable example of this is complex text rendering (e.g. for a text editor).
Or to put it more differently, there's a reason why Electron is so popular and it's not "because developers are stupid".
there's a reason why Electron is so popular and it's not "because developers are stupid"
Yeah, it’s mostly cause their bosses are cheap.
When you say "true alternative" I'm like there's plenty, like win32 isn't too bad lol. But obviously, you must have requirements for a web view specifically, yes?
I have reasonably good experience using WebView2 on Windows, but Linux and Mac don't really have a match for it. I use CEF on linux and it isn't bad, but it has had limited version stability so it makes your program a very heavy download. So not particularly advantages vs electron, so if you need the platform support, you have trouble.
Of course, I often also just do plain websites too...
i have been enjoying GPUI quite a bit recently. i am fairly certain it should be possible to build an electron style UI library by embedding servo into applications, as servo gains maturity.
https://github.com/googlechromelabs/carlo had a really compelling approach. Clean node to web IPC model, reuses installed Chrome.. it was really something.
I strongly suspect that the difference between the average Tauri application and the average Electron application is far smaller than the difference between any two applications using any web renderer whatsoever. That is, if you want a more lightweight app, and you're currently using Electron, you're better off optimising your current frontend code than you are switching to Tauri.
There are other reasons to prefer Tauri over Electron, but I think the big selling point of Tauri being more lightweight is mostly overplayed.