Top
Best
New

Posted by thunderbong 11 hours ago

Every Windows 11 app should kill Electron, and Discord just showed why(www.windowslatest.com)
153 points | 160 commentspage 3
kryptonomist 9 hours ago|
Let’s hope we see a new wave of desktop apps rewritten natively, thanks to LLMs. Whether they use Rust with GPUI, C++ with Dear ImGui, or something else entirely, that would be great. Personally, I’m so fed up with bloated UIs. Windows is full of them, and it’s a pity considering how powerful our CPUs are.
r_lee 9 hours ago||
> C++ with Dear ImGui

it would be absolutely awful

compared to chromium, it's really limited, like it's just always a compromise with these

we should instead figure out a way to do electron but better and make it easier to do the things you can do with e.g. React with native languages and frameworks

debazel 9 hours ago|||
The limitations are a large reason for why they're so resource efficient in the first place.

If you just reimplement Electron in a native language then you get... Chrome, which is already written in C++. The majority of RAM usage in Electron applications is from the native parts of Chrome itself and a decent ~40 MiB chunk for the Node.js runtime.

ogoffart 7 hours ago||||
That’s what we’re trying to do with Slint (I work on it): a declarative, reactive UI like React, with the logic in Rust, C++, JS or Python. It needs no browser engine, so it uses a fraction of Electron’s memory.
amelius 9 hours ago||||
QtQuick is quite good.
the__alchemist 8 hours ago||||
Are you a web dev?
r_lee 8 hours ago||
I use ImGui regularly, if you believe that it is on the same level as what you can do with React/HTML/CSS/etc. then I don't know what to tell you
the__alchemist 8 hours ago||
I have seen this assumption in recent GUI threads here (More so your upper post): Building a PC application is not equivalent to building a web browser. A web browser is a type of PC application built for a specific (But very broad!) use. I didn't think I would need to write this statement/distinction, but I have here. Web languages, culture, and syntax have not been a value add to PC application development. Electron is the clearest example why. My model is that is the value add of Electron: Appealing to web devs through language and culture.

Regarding "not doing what you can do with HTML/CSS/JS". Doubt. I varied and complex stuff and have never felt I needed to overload document rendering langs for this.

I will go a step further: I don't think Electron is a symptom of HTML/CSS/JS: I suspect it's more from the Node + Framework culture.

r_lee 7 hours ago||
it's not just about "appealing to web devs"

you simply just would stumble if you tried to do development like you can in React, constant "uhh... can't do that." while it just works in React.

I don't think anyone likes the look of Qt more than what you can achieve with webapps in terms of UI (style/etc. wise)

problem is the performance, I don't think many would be complaining if the performance was proper and the memory usage wasn't as terrible as it is now

you're talking about web browsers, I don't care what it runs on, if we have a way to run this in a lightweight way, would your complaints go away?

even Gnome uses JS etc.

you can do complex stuff in native UI, of course you can

what I'm talking about is the same kind of DX as with React. I really don't have faith in that, e.g. the new thing Discord is about to use, the css it tries to imitate just seems absolutely terrible.

the web technologies aren't perfect, in fact, far from it. however, when I see React vs whatever C/C++ alternative, I'd always go for React if it's about making the UI nice.

I've also shat on Electron before, but there's a reason as to why it's so popular. the tooling/UI capabilities are just much more powerful.

Telaneo 1 hour ago|||
> I don't think anyone likes the look of Qt more than what you can achieve with webapps in terms of UI (style/etc. wise)

I don't want web app UIs. They all look different for no good reason. I want native UIs. I like qt. Please just give me a stable UI that I learn and stick with for the next 20 years.

bigstrat2003 2 hours ago|||
> I don't think anyone likes the look of Qt more than what you can achieve with webapps in terms of UI

You are incorrect. In fact, us users hate that fact that UI designers keep making apps that look nothing like the rest of our system. Give me a nice native-looking app any day of the week.

caspper69 8 hours ago|||
I have had excellent results running a back-end Rust process that communicates with a C# Avalonia front-end via protobufs over named pipes on Windows and Domain Sockets on Linux and MacOS. With C# AOT I’ve been able to create self-contained apps that run incredibly fast despite the ipc between the front end and the rust core. I’m getting full 6 platform coverage too (Win/Linux/macOS on both x64 and arm64).

edit: Avalonia is quite mature, with accessibility to boot.

airstrike 9 hours ago|||
or Rust with things other than GPUI
cpursley 9 hours ago||
Crux, lets you use native UI but Rust for business layer: https://github.com/redbadger/crux
fnord77 1 hour ago||
interesting, I would have guess Tauri. til GPUI
petterroea 9 hours ago||
It's hard to say "Discord just showed why" before the product is in production and sees actual use. Promising initial statistics, but the transition is based on a lot of assumptions that won't really be proven until mass adoption and the software has seen long-term maintenance.
flohofwoe 9 hours ago|
...exactly, and at some point you want to show inline animations or videos and all sorts of other media, show webpage previews, play audio snippets and all the other things things a webpage can do, and then you're back to either integrating a browser engine or attempt to write one from scratch (the browser engine can of course be provided by the system webview, e.g. what Tauri does).
goalieca 8 hours ago||
I’ve programmed inline video players for 25 years. Same with audio and everything else. We had “accelerated” graphics back with winxp and gdi+ and of course OpenGL over ssh with x11. Browser preview pages in most apps are usually snippets of text and maybe an icon or pic. Not rendering a full page.

In a way, applications regressed a lot with react native and electron. I get it’s easier to develop but the apps are very bloated and underperforming even on computers with 10-100x more power.

giancarlostoro 1 hour ago||
One thing Electron has over Tauri for Discords case is WebRTC. I tried making an open source alternative using Tauri and got plenty far, then I learned that WebRTC on Linux is not OOTB since its still experimental. Webkit on Linux requires WebkitGTK, so everything under the sun out there that had “webviews” cross-platform cannot do WebRTC ootb.

At least now Discord will consume your GPU vram while you game.

Sean-Der 1 hour ago|
This is so close to being fixed!

I am guessing this is just capture/playback code issue? You have a portable WebRTC stack in rust https://github.com/webrtc-rs/webrtc

I haven't used Tauri myself but this sounds like a fun thing to go fix. Silly this is a blocking issue.

ryandrake 6 hours ago||
If LLMs are truly driving the cost of "writing code" down to zero, then we shouldn't need Electron anymore. The whining from developers about how it's soooooo hard to write and maintain N separate native applications is no longer valid. Point an LLM at your existing Electron code base and have it fork off a bunch of native ports of it. LLMs are surprisingly good at matching the functionality of existing software. Keep and maintain the Electron app as an internal reference design (your developers probably only know JavaScript anyway) and "build" all your actual production releases from that.
bl4kers 3 hours ago||
Just use the website. It's going to be a better experience than the vibecoded Rust approximation for the foreseeable future
opengrass 9 hours ago||
Signal is still dragging Electron, can't have a working FreeBSD port due to dependency hell. Also VSCode.
fg137 9 hours ago|
Meanwhile Zed isn't really usable on machines without a GPU e.g. VDIs

https://github.com/zed-industries/zed/discussions/17212

I don't know if we have a winner here.

anthk 5 minutes ago||
Lapce works, so does the ArtCraft suite even on Aros. No Vulkan there, just MESA 26 with OpenGL 4.6+ and that's it.

Altough I use evcode myself. But there are tons of GUI IDE's/editors for Rust out there.

Also, this curb-stoms VS Code:

https://github.com/Sidenai/sidex

codedokode 1 hour ago||
For me the ugliest part of Electron is that it uses client-server model inside a program and includes both a browser and Node.JS. This is so stupid. If you love microservices so much why don't you put every React component in a separate process?

Also, browsers contain too much bloat, why do you need support for elements like "hr" or attributes like "cellpadding" in a modern app? Throw away all legacy garbage.

Also, immediate mode UIs (like Rust's egui) are even worse garbage than a browser. "Immediate mode" means that on every mouse move a function is run that re-draws whole window from scratch. I tried running PhotoCraft (uses egui) in a VM with no GPU and it felt like playing a game at 3 fps. The CPU is simply unable to redraw whole GUI with acceptable speed. It will be especially bad on 4K and 8K screens.

zerr 2 hours ago||
So, it has always been a skill issue.
revolvingthrow 2 hours ago|
Hot take, but: love electron. Write once, runs anywhere. The majority of bugs aren't platform specific. Easy to get nice visuals that stay consistent across different OS. Yes, it's not native. I don't care. It's not a painting to be admired. The focus on looks and visuals versus usability and ux is a plague.

Yeah, it takes some extra ram. Fork my stuff and rewrite it in rust if you care. I don't. The few hot spots can be fixed by using a lower level language. Is vs code not zippy enough? I certainly haven't noticed the slowness. People keep complaining about unnecessary load as if hardware hasn't progressed since 2004. It's hugely important for things like your OS. A few apps you run twice a month? Who cares.

But what about software used by billions, asks a person angry about my electron project used by thousands? How many ages were taken up by the five second startup time when you multiply that by however many users (all this time would be spent curing cancer of course)? Sure, improve performance when needed. For the vast majority of projects it's not needed. The average computer isn't pi zero.

bigstrat2003 2 hours ago|
> Yeah, it takes some extra ram. Fork my stuff and rewrite it in rust if you care. I don't.

And that, right there, is why people hate apps which use Electron. You are spending my system resources so that you can be lazy and not have to program as much. That's not really acceptable development practice.

CamperBob2 7 minutes ago||
If it's FOSS, what's your beef? You want a native version, point a clanker at the repo and tell it to party on.
More comments...