Packaging JavaScript for the Desktop
Need a desktop version of your JavaScript application or game? Which tool should you use?
I've been building a markdown text editor for my own use, and I wanted it to be multi-platform so that I could share it with other people.
The problem I have is it works but it is a lot more bloated than a text editor should be. It's compiled using Electron which bundles a whole web browser right into the app. That's a memory hog and makes the distributable a much bigger download than people would expect.
Also I find Electron architecture more cumbersome than it needs to be for simple tools and utilities, so I find myself turning to C/C++ or Python and command line interfaces out of comfort zone. This isn't a problem short term, but career wise and commercially I need to have more in my resume toolbox.
Here's what I learned about the JavaScript packaging options today in 2025, and what I will be looking at using in future. Let me know if there are options I have not considered!
1. Electron https://www.electronjs.org/
Electron allows developers to build cross-platform desktop apps using essentially a Node web dev setup, but on a local machine (HTML, CSS, and JavaScript). It does this by packaging a Chromium browser right in to the executable, but on the plus side it runs exactly as it you would expect.
Pros:
Uses familiar web development tools.
Access to vast Node.js packages via npm.
Consistent experience across platforms.
Popular choice (VS Code, Slack, Discord, Notion, Dropbox)
Cons:
Creates huge app sizes because each app includes its own Chromium.
Can be resource-heavy, especially for simple apps or games.
Communication via Inter-Process Communication (IPC).
Build tools for multiple OSs (Electron Forge or Electron Builder).
2. Tauri https://v2.tauri.app/
Tauri uses the native web view of each OS instead of bundling its own browser engine. This results in smaller app sizes and easier access to system file operations.
Pros:
Smaller size since it uses Edge on Windows, WebKit on macOS and Linux.
Easier to work with local file system/OS via a simple JavaScript API.
Plenty of options for integrating native SDKs.
Cons:
Requires writing Rust for more lower-level operations.
Web view engines differences, which can cause rendering problems.
Need to run different OS environments for each build.
3, 4. Neutralino.js https://neutralino.js.org/ and Wails https://wails.io/
Both Neutralino and Wails are similar to Tori, aimed at quick, simple desktop apps using Web tech without the heft of Electron.
Neutralino.js: JavaScript API for simple file operations, and backend can be in any language via WebSockets.
Wails: Uses Go for native code.
Pros:
Smaller app sizes.
Easier API for common tasks like file access.
Good for simple apps not requiring complex SDK integrations.
Cons:
Limited in their ability to fully interface with APIs/SDKs.
Build on each OS to generate correct binaries.
5. NW.js https://nwjs.io/
So far it seems the winner is NW.js. It produces small, high performing binaries, for the major desktop OSes. Over 5,700 games on Steam are built with NW.js (e.g., games built using RPG Maker and Construct).
Benefits:
Ease of coding: No forced separation between frontend and backend code or need for anything but JavaScript.
Simple OS operations: Writing and reading save files with straightforward code.
Cross-platform: Creating executables for Windows, Mac, and Linux is straightforward using pre-built binaries and minimal setup.
Smooth workflow: Minimal modifications needed to package web app for desktop. It allows quick iterations, hot reloading during development, and simple build automation.
To use NW.js you simply include your source code in a designated folder (called package.nw) alongside a pre-compiled NW.js binary for each target platform. Running the binary loads your code as a native desktop app, similar to launching a regular executable.
Download the NW.js binaries for your platforms.
Put your code inside a folder named
package.nw.Merge the folder with the NW.js binary.
Rename the output as your app's name
Use a tool to customise icons if desired.
This process should make distribution simple, allowing you to generate and update standalone executables quickly.
What's Next?
If you're interested in wrapping your JavaScript for desktop give NW.js a try. I think I will put it to the test with a simple project such as a small game or utility before embarking on a whole app.
Leave Packaging JavaScript for the Desktop to:
Read more #programming posts
Best Posts From Maker Hacks / chrisg
We have not curated any of makerhacks's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From Maker Hacks / chrisg
- 30-Year Freelancing Anniversary and Domaining
- Retro Roguelike Dungeon Crawler (Long Overdue Updates)
- Claude is both the best and the worst
- LLM-Assisted Debugging Rollercoaster
- The LLM Middle-Ground
- How to talk to your family about AI
- The “Joys” of Original Retro Hardware
- It’s easier than you think to build yourself a custom keyboard
- Remote Control Your Android Device
- Instead of Opening Up PostgreSQL to Remote Connections, Do This
- I finally switched away from the default Mac terminal app and you might want to too
- British parliament just mentioned Doom WADs and Kaizo Mario romhacks
- What are your favourite card games?
- Key Signs You’re an Inexperienced Programmer from a Software Grey-Beard
- The Key Difference Between Planning and Strategy
- Better Github/Gitlab Workflow
- Personalise Your Chrome Browser Experience with Scripts
- Hide Particular Hive Spammer's Comments Completely
- I didn’t have time to finish my text adventure game so I wrote a map editor
- Packaging JavaScript for the Desktop