Blog/Why Focuh Uses Tauri Instead of Electron
TauriElectronRustmacOSdevelopment

Why Focuh Uses Tauri Instead of Electron

7 min readFocuh

When we started building Focuh, the obvious choice for a desktop app with a web frontend was Electron. It's what VS Code, Slack, Discord, Notion, and dozens of other apps use. It works, it's well-documented, and it has a massive ecosystem.

We went with Tauri instead. Here's why, and the honest tradeoffs involved.

What Is Tauri?

Tauri is a framework for building desktop applications. Like Electron, it lets you build your UI with web technologies — HTML, CSS, JavaScript, React, whatever you prefer. The difference is in what runs underneath.

Electron bundles a full copy of Chromium (the engine behind Chrome) and a Node.js runtime into every application. Your app is essentially a dedicated Chrome window with Node.js powers.

Tauri uses the operating system's built-in webview — WebKit on macOS, WebView2 on Windows — and replaces Node.js with a Rust backend. Your app talks to the system's existing web rendering engine instead of shipping its own.

This architectural difference cascades into everything else.

Binary Size: 15MB vs 200MB

Focuh's macOS installer is roughly 15MB. A comparable Electron app starts at around 150-200MB before you've written a single line of application code, because it has to bundle Chromium.

For a focus timer — an app that lives in your menu bar and runs in the background — shipping 200MB of Chromium is absurd. You're downloading an entire web browser just to display a countdown and a task list.

With Tauri, the Rust backend compiles to native machine code, and the frontend uses WebKit that's already on your Mac. The result is an app that installs in seconds and doesn't eat your disk space.

Memory Usage: 80-120MB vs 300-500MB

This is where it matters most for a focus app.

Focuh typically uses 80-120MB of RAM while running. Electron apps commonly consume 300-500MB just idling, because each Electron app runs its own Chromium renderer process (sometimes multiple).

When you're trying to focus, every megabyte of RAM consumed by background utilities is memory taken away from your IDE, your browser tabs, your design tools. A focus app that slows down your computer is self-defeating. If your productivity tool is competing with your actual work for system resources, something is wrong.

Focuh is designed to stay out of your way. Low memory usage isn't a nice-to-have — it's a core requirement for an app that runs alongside resource-heavy development tools.

Native System Access Through Rust

Focuh's headline feature is system-level website and app blocking. This requires deep integration with macOS:

  • Accessibility APIs to detect and close blocked applications
  • System tray with a live countdown timer using monospaced digits
  • Deep links (focuh:// protocol) for integrations
  • Auto-updates with code signing and notarization

Tauri's Rust backend gives us direct access to macOS system APIs without going through JavaScript bindings or native Node modules. The blocking logic that intercepts applications runs in Rust, calling macOS Accessibility APIs directly. This is faster and more reliable than the Electron approach of bridging between JavaScript, Node.js native modules, and the operating system.

Rust also makes concurrency straightforward. The tray timer updates every second, the blocking system monitors running processes, and the heartbeat system tracks active sessions — all running concurrently without the complexity of Node.js worker threads.

Rust for Safety

Rust's ownership model eliminates entire categories of bugs at compile time — null pointer dereferences, data races, use-after-free errors. For an app that modifies system behavior (blocking websites and apps), this matters more than usual.

A crash in the blocking system could leave sites blocked with no way to unblock them, or worse, silently stop blocking without the user knowing. Rust's compiler catches memory safety issues before they reach users. The blocking logic either compiles correctly or doesn't compile at all.

This isn't theoretical. During development, Rust's borrow checker caught several concurrency bugs in the tray update logic that would have been intermittent runtime crashes in C, C++, or even Go. Finding these at compile time instead of in production is the difference between reliability and "works most of the time."

The Tradeoffs We Made

Tauri isn't strictly better than Electron. There are real costs.

Smaller Ecosystem

Electron has thousands of npm packages, plugins, and community solutions for nearly every problem. Tauri's ecosystem is growing but much smaller. Several times during development, we needed to build something from scratch that would have been an npm install in Electron.

The Tauri plugin ecosystem covers common needs — auto-updates, deep linking, system tray, file system access — but for anything unusual, you're writing Rust yourself or finding a Rust crate.

Webview Rendering Differences

Electron uses Chromium, so your app renders exactly like Chrome. Tauri uses the system webview, which on macOS is WebKit (the engine behind Safari). Most of the time this doesn't matter, but occasionally a CSS feature behaves slightly differently in WebKit versus Chromium.

We've hit a few cases where a layout worked perfectly in the browser during development (which uses Chrome or Firefox) but needed tweaks in the Tauri webview. Nothing major, but it adds testing surface area.

Less Battle-Tested for Complex UIs

Electron powers VS Code, which is one of the most complex desktop UIs ever built. It's proven that Electron can handle sophisticated interfaces. Tauri is younger and has fewer apps pushing the boundaries of what's possible.

For Focuh, this isn't a concern — our UI is a timer, a task board, and a settings panel, not a code editor. But if we were building something with the complexity of VS Code or Figma, Electron's track record would carry more weight.

Rust Learning Curve

If you're a JavaScript team, adopting Tauri means learning Rust for the backend. Rust has a notoriously steep learning curve. The borrow checker is worth the effort, but it's effort nonetheless.

Why It Matters for a Focus App

A focus app has specific requirements that make Tauri's tradeoffs favorable:

It runs in the background. You start a focus session and the app needs to sit quietly, blocking sites, updating the tray timer, and tracking your session — without consuming resources you need for actual work.

It needs native system access. Website blocking that works across all browsers requires operating system-level APIs, not browser-level hacks. Tauri's Rust backend makes this natural.

It's a utility, not a destination. You don't spend hours in Focuh staring at its UI. You start a session, glance at it occasionally, and focus on your real work. For this kind of app, low overhead matters more than rendering the most complex possible interface.

Fast updates matter. A 15MB download updates in seconds. A 200MB download takes longer and uses more bandwidth. For an app that auto-updates, smaller binaries mean less friction.

Electron is a great framework, and it's the right choice for many apps. For a focus timer that needs to be light, native, and stay out of your way, Tauri is the better fit.

Ready to focus?

Block distracting sites, timebox your day, and get more done.

Download Focuh free