The app size also went from 10 GB to 10 MB, start time went from 10 secs to 10 ms
Goodbye Electron, we barely knew you
Electron being bad is a bit of a junior- to mid-level engineer tell in my eyes, the sort of thing you'd say if you've just learned that some apps use more RAM than others, maybe built a small Rust TUI and are now wondering why not everything is using Rust. Something you'd believe just before you learn what engineering trade-offs are.
So, yeah, enjoy rebuilding complete browsers, I guess? I'm sure they'll run more efficiently than the rendering engines that have been refined and tweaked over the course of now multiple decades.
Well, unless you leave out the annoying stuff, like a11y, IME, RTL, but who needs those things anyway, am I right.
Then you find out that iterating on a fully Rust-based app is sloooow, so you add a scripting layer, maybe integrate a little Lua VM or something that lets you execute JavaScript?
Congratulations. You've built a browser, just with fewer features, more bugs, and probably higher RAM usage. Good job.
Holy Jesus of Nazareth. I love it.
I just pray that Vencord will continue to work in some form, if only so I can use whatever font I want. I'm not a fan of many other changes they've made and I've thus had to reverse, but I'm willing to trade away the flexibility of CSS for an app that uses 5 times less RAM. Even better if it doesn't go away at all, but we'll see.
It's crazy how much RAM electron needs, at my old startup the main product was an electron app, i initially used to run into this issue where AI wouldn't clean up the dev builds it spunned up for e2e testing and each could be over 500MB, it just get's to a point that the cross platform advantage is no longer worth it, i think it was one of the main reasons cursor had to move off electron to rust based builds.
I'm very interested in (and a total novice in) cross platform GUI application development. Hadn't heard of GPUI, though I had heard of Tauri. I looked at the GPUI front page and saw this mess of almost-CSS method chaining... Surely there's a better way? This seems horrible to me.
> div() .flex() .flex_col() .gap_3() .bg(rgb(0x505050)) .size(px(500.0)) .justify_center() .items_center() .shadow_lg() .border_1() .border_color(rgb(0x0000ff)) .text_xl() .text_color(rgb(0xffffff)) .child(format!("Hello, {}!", &self.text)) .child( div() .flex() .gap_2() .child(div().size_8().bg(gpui::red())) .child(div().size_8().bg(gpui::green())) .child(div().size_8().bg(gpui::blue())) .child(div().size_8().bg(gpui::yellow())) .child(div().size_8().bg(gpui::black())) .child(div().size_8().bg(gpui::white())), )
I noticed this news and because one of my codex banked reset is expiring soon
I launch codex with astra+ultra on my tauri project because webview sometimes cause blank screen on user device to let it to rewrite the tauri projec to GPUI
It did those stuffs for me
- get rid of the CGO and MINGW toolchain for cross building windows on Linux
- wrote a compatbility layer to communicate the original app backend written using rust
- Achieve not ideal but acceptable UI/UX as the tauri project
- The new build using 24MB memory which is quite good and I do not even bother to check the tauri version
It amazing time to rewrite, though I still can't remember joy of old days that manual coding, but my lower back ask me to just embrace the Agentic coding...
I've never used GPUI. Does GPUI provide the same assurances of accessibility? Of proper CJK rendering?
Activities will apparently still use Tauri. Is that going to be a compatibility nightmare due to WebKit? (At least until CEF comes out)
The Linux desktop client was using a bit more memory than I expected. 1326 MB from a cold start, and I'm only in 11 servers.
There was already an electron-free native client for discord some years back, but they interfered with it. At this point, there's nothing at all impressive about this. It's not hard to ask AI to "RIIR" as has been shown many times. However, I am glad that building stuff on electron might finally be seen as lazy and wasteful.
If I understand correctly, they're ditching Electron but still using React but with their custom renderer.
Not sure what to think of this.
Sure, a Rust implementation will perform better and use less RAM, but it's quite obvious that the transition to Rust will be done almost entirely by AI.
Don't get me wrong, the AI coded Rust version of Discord will most likely work just fine. The thing I'm wondering about is if it's a good idea to rewrite your whole codebase (which I assume is handwritten since Discord predates AI coding) with AI because now there is nobody that knows how it really works - I'm wondering what's the value of having a human-written codebase + the people who wrote it. Just feels like one shouldn't throw that into the trash like it's nothing?
Link to post referenced in the article
https://nitter.click/svishnevskiy/status/2118081920194203799
discord's electron app was a study in bloatware, quite unlike nearly all other electron apps I've used.
Asking in good faith: In the agentic age why use abstractions like Electron at all? Shouldn't we write apps in lower-level system languages like Rust like Discord has done?
It doesn't say but it's likely a direct product of AI.
As the motto says, "you can just do things"
Such a rewrite would have been unthinkable 2 years ago, but now it's table stakes.
Potentially even more lightweight: ditch Discord altogether.
Maybe we should collectively use more of our personal tokens to re/write, extend and mix up the common(s) stacks at this point?
We are at a point where the "port this to rust, make no mistakes" meme is basically a reality.
DO TEAMS NEXT
"To continue reading *blah blah* *barfs* Verge subscription" WTF???
15 years reading the verge without subscription. What happened?
[flagged]
[flagged]
[dead]
[dead]
That's a direct benefit from AI.
If all products ditch Electron, it satisfies the NSA requirements of having AI-generated backdoors on your computer, while allowing you to reduce your RAM consumption and letting this precious silicon for Sam Altman (He's quoted saying RAM is better spent in data centers than in personal computers - and in an era where everything is Cloud, one might wonder why the base Macbook Pro has 32GB).
Hopefully we will get an Electron-free VSCode too at some point.
edit: there is one https://github.com/Sidenai/sidex haven't tried it yet
Maybe the good thing to come out of the RAM crisis is that engineers will care about memory usage again lol.