DEV Community

Kartik Patel
Kartik Patel

Posted on

Wails as Electron Alternative

What is Electron and Why is it Bad??

Electron is an open-source framework that combines the Chromium rendering engine with Node.js. In simple terms:

Chromium provides the window and renders your HTML/CSS/JavaScript (like a mini-Chrome browser)

Node.js gives you access to the operating system and file system

Together, they let web applications break out of the browser sandbox and behave like native desktop apps.

Some popular examples of electron applications is Visual Studio Code Editor and Discord.

This all sounds very smooth and light, but the issue starts here
The issue with electron is:

Performance and Resource Usage

Electron apps are super resource-heavy.

Every Electron app ships with its own complete copy of Chromium (the Chrome browser engine) and Node.js. This means if you have 5 Electron apps running, you essentially have 5 Chrome browsers open simultaneously.

  • A simple 'Hello World' Electron app can use 100-200MB of RAM. Complex apps like Slack or Discord can easily consume 500MB+

  • Even simple apps are typically 100MB+ because they include the entire
    Chromium runtime

  • The multi-process architecture means multiple CPU processes for a single app

App Size/Bloat

Small functionality comes in large packages.

You might write 1MB of code for a simple text editor, but the final Electron app could be 150MB. That's a 150x multiplier for the framework overhead.

  • A native macOS menu bar app might be 5-10MB. The same functionality in Electron would be 100MB+

Security Considerations

Web technologies weren't designed for desktop app security, and you're inheriting Google's ecosystem.

You're essentially shipping Chromium - a complex browser engine maintained by Google. While Chromium itself is open-source, it's important to remember that Google's business model revolves around data collection. This creates several concerns

  • You're dependent on Google's security priorities and patch timelines

  • Chromium includes features and APIs that facilitate Google's services

  • Even in 'standalone' apps, you're running code within Google's browser architecture"

The powerful Node.js backend access, combined with Chromium's extensive API, creates a massive attack surface. A single vulnerability in your renderer process could give attackers full system access through Node.js integration.

Alternatives

At the time, we were not able to escape the Electron bloat because there were no alternatives then, In June 2022, Tauri's first stable version came out, and the hype was all over.

Tauri was something that had resolved all electron issues with better functionality and a more native feel.

The same application that cost you 150-200mb of storage now costs 2-30mb, and I am not even joking. Ram usage started to drop heavily.

The reason tauri dominated in benchmarks was that Electron preferred the Chromium method. Each export of an Electron application also had Chromium packaged, which cost Storage, RAM, and a Native feeling, but the approach Tauri adopted was a kinda smart and sneaky one. Instead of packaging a whole browser, they used systems in the Existing Web Engine.

  • On Windows: It uses the WebView2 that's already part of Windows 10/11

  • On macOS: It uses the WebKit that Safari uses

  • On Linux: It uses WebKitGTK

This was already revolutionary and out of the box. Another approach Tauri used was instead of using Node.js for the backend, it uses Rust. Rust was already a programming language that was getting hype at the time due to its stability, performance, and reliability. Often, Rust is referred to as C++ Killer (that totally different topic for now), and now Tauri getting Rust support was a deadly duo, but it was also controversial because

RUST IS HARD

In the list of the most useful and hard programming languages, Rust probably dominates many, and that's the reason, and the only negative point Many don't prefer Tauri.

But maybe there is an alternative that combines the flexibility of Tauri and the ease of Electron

The WAILS Alternative - Tauri But Easier?

Here's a framework nobody's talking about enough: WAILS. It's basically Tauri if it were easy.

While Tauri uses Rust (amazing performance, but steep learning curve), WAILS uses Go - a language that's both fast AND approachable.

The best of both worlds?

  • ✅ Uses system webview (like Tauri)
  • ✅ Tiny binaries (like Tauri)
  • ✅ Go backend (easier than Rust for most web devs)
  • ✅ Still miles better than Electron

The catch? Smaller community than Tauri. But for developers who want Tauri's benefits without Rust's complexity, WAILS might be the secret weapon nobody's telling you about.

FURTHER READING

👉Wails
👉Tauri
👉Electron

My Links

👉Youtube
👉Discord

Top comments (0)