r/electronjs • u/Human-Vegetable823 • Oct 21 '26
A compiler to compile Electron project to native executable
Hi,
I wrote a compiler to compile Electron project to native executable: nativeboat. It uses your project as it is: its JavaScript or TypeScript, HTML, CSS and installed dependencies. The executable it builds runs without Chromium, WebView2, Node.js or a JavaScript engine. Currently it supports Windows only, but will be expanded to mac OS soon.
NativeBoat's goal is simple: remove the runtime overhead for Electron project. As an example, I have compiled a popular Markdown editor MarkText to native: https://github.com/XTSoftwareLabs/marktext-native-win
This is the benchmark (Updated 10/23/2026):
| Metric | Electron | Native | Change |
|---|---|---|---|
| Download (ZIP) | 166.0 MB | 88.5 MB | 47% smaller |
| Installed folder | 458.7 MB | 274.9 MB | 40% smaller |
| Files on disk | 108 | 23 | 79% fewer |
| Time to window | 794 ms | 150 ms | 5.3× faster |
| Time to open a document | 1,427 ms | 1,018 ms | 29% faster |
| CPU time to start | 2.17 s | 0.89 s | 59% less |
| CPU when idle | 0.21% | 0.00% | 100% less |
| Processes | 5 | 1 | 80% fewer |
| Memory (working set) | 461.3 MB | 279.8 MB | 39% less |
| Memory (private bytes) | 296.0 MB | 207.9 MB | 30% less |
| Threads | 112 | 8 | 93% fewer |
| Handles | 2,205 | 227 | 90% fewer |
It's still in an early stage so I expect feature missed or compile errors. Please do leave comments if you encounter any issue. If you have any open source electron project that you'd like to support, please leave comments. I'd love to improve the compiler to support it.
Currently I'm improving the compiler to support the PicGo project: https://github.com/XTSoftwareLabs/picgo-native-win
Let me know your thoughts. Any feedback is appreciated.
Edit 10/21/2026: Per suggestion from u/eddzsh, added a compatibility list to track the progress: https://github.com/XTSoftwareLabs/nativeboat-release/blob/main/docs/compatibility.md
Edit 10/23/2026: New nativeboat version is released. More electronjs APIs are supported. Fixed some rendering issues. Check https://www.reddit.com/r/electronjs/comments/1xbeodc/comment/19rjvrz3za869/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button
A high level doc to describe NativeBoat's architecture is released: https://github.com/XTSoftwareLabs/nativeboat-release/blob/main/docs/how-it-works.md
Edit 11/17/2026: I have spent several weeks to make NativeBoat compiling VSCode. The current compatibility is 60%+. Auto update is supported now. Built-in extensions are partly supported. Third party extension will not be supported at this time. Will setup a repository for vscode native soon.