$ xyruscodev7

Blog

Why I Ditched Electron for Desktop Development

I built a desktop downloader with Rust and Tauri because Electron kept eating my RAM. Here's how that went.

·6 min read
RustTauriDesktop

I started desktop application development back in 2018 for my final year project. That was when I discovered Electron. It was JavaScript, which I already knew, and it looked clean and nice. But there was an issue with it: performance.

A small app ran fine, but as it grew, you started having issues.

I was a student. My laptop had 4GB of RAM. Between my IDE, Node running underneath, and the already-open Chrome instance I was reading the Electron docs and StackOverflow off of, firing up a new Chromium instance was often more than it could bear.

A bare Electron "Hello World" ships a full Chromium browser engine and a Node.js runtime. At idle, that baseline lands somewhere between 150MB and 250MB of RAM. Each BrowserWindow you open tacks on another 50 to 100MB.

I didn't know any of this in 2018. I just knew my laptop hated Electron.

The Migration to Tauri

Video Plucker started as an Electron app. It worked. It also idled at several hundred megabytes of RAM to render what is essentially a text field and a progress bar.

Tauri swaps the bundled Chromium for the system webview and moves the heavy lifting into Rust. The binary dropped by an order of magnitude and startup became instant.

The tradeoff is real: webview differences across platforms are your problem now, and the Rust side has a learning curve. For a tool this small, it was worth every hour.

Comments