← All blogs
March 1, 2020·Electron

Lightweight alternatives to Electron

What are some smaller toolkits that make it easy to build desktop apps with HTML, CSS, and JavaScript.

Ramón Echeverría
Ramón Echeverría
The paradox of Electron is the bundling of a full Chromium instance while all users already have a browser installed locally.
The problem comes when users run several Electron apps at once, and each comes with its own overhead (i.e. the runtime memory consumption of the browser-runtime as a whole, independent of how many render contexts are open.).
This is quite inefficient but sadly there are no true cross-platform webview standard as of today that Electron could use.
So what are some alternatives to be considered?
The alternatives we'll have a look at are:
  • Allow to use HTML/CSS/JS to build desktop apps
  • Cross-platform
  • Don't package a full browser when shipping your app

Webview

Webview is a tiny cross-platform webview library with bindings for C/C++/C#/Golang/Python. It uses WebKit (Gtk on Linux / Cocoa on MacOS) or Edge (on Windows).
It supports two-way JavaScript bindings (to call JavaScript from native code and to call native code from JavaScript) so that you can build apps that have access to the os.
As opposed to Electron, you have to deal with cross-browser web compatibility issues between WebKit and Edge, but this is something you can handle.
There are bindings for Node.js (although not very popular) and the repo gives good examples as to how to use the project:
const { WebView } = require('../') const express = require('express') const app = express() app.use(express.static(__dirname)) app.listen(3000) const view = WebView({ title: 'Home', url: `http://localhost:3000/index.html`, height: 600, width: 800, }) view.show()

Neutralino

Neutralino is a somewhat new project which aims to be as easy as Electron but using the already installed browsers.
That means smaller packages (< 10mb) and smaller RAM footprint (<10mb) for your users.
Check out this benchmark comparison if you're interested.

Proton Native

If you have experience with React Native, Proton Native will be very familiar to you.
It uses the same components as React Native, it makes it easy to build real native apps from Javascript.
Great if your UI needs aren't too complex.

Carlo

Carlo was another alternative by the Google Chrome team. Same as Neutralino, you get full access to Node and the user system.
It works as long as the user has Google Chrome installed.
However it's not maintained anymore and has a lot of bugs open that have gone long without being fixed.
We can only hope a community fork will continue the work.
 

 
I don't think these projects are ready to be used over Electron for most apps yet.
Electron's force is also the huge community, the tutorials, articles and years of bug fixing that makes the developer experience really smooth.
That said, definitely keep those options in mind if your next app doesn't need all the native APIs that Electron provides.

Get the latest posts, right in your inbox

We write about building products using analytics. No spam, ever.

Astrolytics

Understand how well your product is doing today
with Astrolytics

Integrate in minutes and get started with our 30-day free trial.