Back to Blog

Why We Build AI Tools with SwiftUI Instead of Electron

Fazm Team··2 min read
swiftuielectronmacosnative-appdeveloper-tools

Why We Build AI Tools with SwiftUI Instead of Electron

Every developer tool startup faces the same decision early on: Electron for cross-platform reach, or native for platform quality. We chose SwiftUI for Fazm, and it was not a close call.

The Feel Difference

Open any Electron app on macOS and you can tell within seconds. The text rendering is slightly off. Scrolling has a different momentum curve. Keyboard shortcuts do not quite match what you expect - Cmd+comma might not open preferences, Cmd+W might not close the current tab the way native apps do.

These are small things individually, but they add up. Developers spend 8+ hours a day using their tools. Small friction compounds into real frustration over weeks and months.

SwiftUI gives you all the platform conventions for free. Standard keyboard shortcuts work. Menu bar items behave like every other menu bar item. System notifications use the native notification center. Dark mode, accessibility features, and window management all work exactly as users expect.

Performance Is Not Close

A native Swift app on Apple Silicon uses a fraction of the memory and CPU that an equivalent Electron app requires. Electron bundles an entire Chromium instance - that is 200-400MB of RAM before your app does anything. A SwiftUI menu bar app can idle at 15-20MB.

For an AI agent that runs continuously in the background, this matters. You do not want your automation tool consuming resources that could go to the actual work.

The Trade-Off Is Real

You give up Windows and Linux support. For some tools that is a dealbreaker. For a macOS AI agent that uses macOS-specific APIs like Accessibility framework and ScreenCaptureKit, cross-platform was never realistic anyway. The features that make the agent powerful are platform-specific by nature.

If your tool depends on deep OS integration, go native. If it is a web app in a window, Electron is fine. Know which one you are building.

Fazm is an open source macOS AI agent. Open source on GitHub.

Related Posts