From Electron to Tauri: From 100MB to 5MB

I rebuilt a desktop app with Tauri after Electron's 100MB build size became impossible to ignore. Here's what changed, and why I won't go back.

[ Tauri ][ Electron ][ Rust ][ Desktop App ]
May 29, 20265 min read

The moment I realized something was wrong was when I pushed my first GitHub release.

The installer was 100MB.

For an app that reads files and displays a simple UI.

That number stuck with me. Not because it was wrong — it compiled fine, ran fine — but because it felt dishonest. The actual app logic? Maybe 2MB. The other 98MB was Chromium and Node.js, bundled silently in the background.

That was the beginning of the end for me and Electron.

Why I Started with Electron

Electron made sense at the time.

I already knew JavaScript. I could reuse my web frontend directly. Cross-platform support came for free. The ecosystem was huge — everything I needed had a package.

For a weekend project, it was perfect.

The problem is what happens after the weekend.

What Electron Actually Ships

When you build an Electron app, you're not just shipping your code.

You're shipping:

  • Chromium — a full browser engine (~80MB)
  • Node.js — a complete JS runtime
  • Your app — the part you actually wrote

The breakdown looked like this:

Total build:     ~100 MB
Your app logic:    ~2 MB
Chromium + Node: ~98 MB

This is by design. Electron guarantees a consistent runtime by bundling everything. But for a small tool, it felt like arriving to a coffee meeting in a cargo ship.

And the cost wasn't just size.

  • RAM usage sat at 200–300MB on launch, before doing anything
  • Startup time took 2–3 seconds on a decent machine
  • Installer experience was slow — users had to wait for 100MB to download

None of these are dealbreakers for a large app. But for a small utility? It was hard to justify.

Finding Tauri

I came across Tauri while looking for alternatives.

The pitch was simple: build desktop apps with a web frontend, but use the OS's native webview instead of bundling Chromium.

  • Windows: WebView2 (already installed with Windows 11)
  • macOS: WKWebView (built-in)
  • Linux: WebKitGTK

Instead of carrying a browser everywhere, Tauri borrows the one already on the machine.

The backend runs on Rust, not Node.js. Frontend stays exactly the same — React, Vue, Svelte, plain HTML, whatever you're already using.

The result: no bundled browser, no bundled Node.js runtime. Just your app.

The Migration

I won't pretend it was frictionless — but it wasn't a rewrite either.

The frontend needed zero changes. Same React components, same styles, same logic.

The main work was in the backend — moving Electron's main process logic into Tauri commands:

Electron ipcMain.handle('do-thing', ...) 
  → Tauri #[tauri::command] fn do_thing() → Rust

On the frontend, calls changed from:

// Electron
ipcRenderer.invoke('do-thing')

// Tauri
invoke('do_thing')

Almost identical interface, different runtime underneath.

The hardest part was writing Rust for the first time. I kept the commands simple — file reads, system calls, basic data passing — and Rust's compiler errors, while verbose, were honest about what I was doing wrong.

It took a few days to get comfortable. Not weeks.

The Result

After the migration, I ran a clean production build.

Before (Electron):  ~100 MB
After (Tauri):        ~5 MB
Reduction:             95%

That number felt unreal at first. But it makes sense — I stopped bundling a browser.

The impact went beyond just size:

  • Startup time dropped from ~3 seconds to under 1 second
  • RAM usage on idle went from ~280MB to ~30MB
  • Download experience: users get a 5MB file, not 100MB
  • GitHub Releases: the release page stopped looking embarrassing

The app felt lighter. Not just in bytes — in behavior.

When 95% of your build is runtime you didn't write, that's not packaging. That's a dependency you're hiding.

The Trade-offs

This isn't a free upgrade. There are real costs.

Rust learning curve. If your Electron main process is complex, rewriting it in Rust takes time. You can't just copy-paste JavaScript.

Smaller ecosystem. Tauri's community is growing but not at Electron's level. Some problems take longer to Google.

WebView inconsistencies. Native webviews differ slightly between OS versions. Edge cases exist. They're manageable, but they exist.

Some Electron APIs have no direct equivalent. Auto-updater, tray behaviors, and some system integrations needed custom solutions in Rust.

None of these stopped me. But they're worth knowing before you start.

Should You Make the Switch?

Switch if:

  • Your app is small to medium complexity
  • Build size or startup time is a real pain point
  • Your frontend is already web-based
  • You're okay learning a little Rust

Wait if:

  • You rely heavily on Node.js-specific APIs
  • Your team has zero appetite for Rust
  • You're in the middle of shipping something critical

Closing Thoughts

I kept the Electron version around for a while as a fallback.

I haven't opened it since.

The 5MB build didn't just solve a file size problem. It removed a whole layer of overhead I'd accepted as the cost of doing desktop development.

Tauri isn't perfect. But for this use case, it was the right call — and 95% smaller proved it.

Sometimes the best architecture decision is simply: stop carrying what you don't need.