Hacker News new | ask | show | jobs
by alexfromapex 115 days ago
I don't know why anyone uses Electron anymore, Tauri produces much smaller binaries and is amazing.
6 comments

I don't know why anyone uses Tauri - disk space is cheap but having to handle QA and supporting quirks for every possible browser engine the users' system could ship with certainly is not.
It's a RAM issue not a disk space issue. Binaries get loaded into memory.

Also if you haven't heard, disk space is no longer as cheap, and RAM is becoming astoundingly expensive.

My Native macos app was using well over 1gb the other day, while my electron notes app was 1/5 of it. Theres an electron tax for sure but people are wildy mixing up application architecture issues and bugs with the framework tax.
It's a RAM issue all right - browsers are set up in a multiprocess manner to allow sharing resources between tabs while sandboxing every single one.

So the footprint of the whole browser might be heavy, but each individual tab (origin) adds only a little extra.

Unfortunately both Tauri and Electron suck in this regard - they replicate the entire browser infrastructure per app and per instance, with each running just a single 'tab'.

And I share your concern for both disk space and RAM - but the solution here is to move away from browser tech, not picking a slightly differently packaged browser.

I'm pretty sure Tauri uses almost as much RAM, you just don't see it because it gets assigned to some kind of system process associated with the webview. Most of the RAM used by a browser is per-tab.
The process is called "webview2" on windows. From memory my Tauri app process is about 6mb memory and the webview2 is about 100mb.
Chrome DevTools Protocol, navigation stack control, download manager, permission mediation, certificate inspection, cache policy control, so nothing you can't implement in an afternoon
Agreed! I built a MacOS Postgres client with just Claude Code[1]. It could use some UI improvements, but it runs much better than other apps I’ve tried (specifically what it’s replacing for me: RazorSQL) and the binary is smaller than 20MB.

1: https://github.com/NeodymiumPhish/Pharos

It's not free, but Postico is excellent https://eggerapps.at/postico2
Tauri is still a WebView wrapped in some chrome, right? That's not what I would consider "native".
Yes. I’d prefer a native interface and have been working on that. I should change the readme until that’s complete.
Eh, didn't even Microsoft give up and just shipped a React-based start menu at one point? The range of "native" on Windows 11 is quite wide - starts with an ancient Windows 3.1 ODBC dialog box.
For all the complaints about Electron, it's at least led to more widespread shipping of some applications on Linux.

Tauri's story with regards to the webview engine on Linux is not great.

Probably because they don't trust the OS shipped browser engine for small inconsistencies.
A webview gives way less control.