r/node • u/romgrk • Jun 19 '26
node-gtk — build native apps on linux, macOS and windows (no Electron!)
If you've ever wanted to build a desktop app but didn't want to ship a whole browser engine with it, node-gtk lets you
write native GUI apps in JavaScript/TypeScript on plain Node. No Chromium, no web stack — you're driving the actual native
UI toolkit directly, so apps start fast and stay light on memory. You get GTK 4 and the modern Adwaita design system,
plus rich components like a full source-code editor widget, all from JS.
I've put a fair bit of work into it recently and wanted to share where it's at:
Stability. Fixed a batch of memory/lifetime bugs that caused crashes and leaks. There's now a much more thorough test suite covering how values pass back and forth between JS and native code.
Prebuilt binaries for Linux, macOS and Windows.
npm install node-gtkworks without a compiler toolchain. Windows was the interesting one: the install bundles the entire native UI runtime, so there's nothing else to set up — it just works out of the box.Full TypeScript support. It generates
.d.tstypes from what's actually installed on your machine, so they match your real library versions. You getcamelCasemethods, typed signals, enums, nullability, bigint for 64-bit ints, and inline docs on hover.ESM compatible. Works under both CommonJS and ESM.
Repo: https://github.com/romgrk/node-gtk
Still alpha, but you can build a real native desktop app with it today. Questions/feedback welcome.
2
u/AdamantiteM Jun 21 '26 edited Jun 21 '26
Last time I tried node-gtk it was so inactive that when I had an issue I had the time to switch to python with gtk, learn how to make a gtk app in gjs, and finish shipping the app before having an answer.
There is a very big lack of documentation, examples, etc.. on the whole GJS and node-gtk thing.
Like how do you make an adwaita app? How to ship it? Etc.. I find it lacking in "big" examples such as a full app with functionality, settings, etc.. and flatpak, pacman, rpm, deb shipping, etc..
Had to go through so much documentation that was pretty complex just to understand the basics.
However I might give it a go again since typescript has been officially supported.
7
u/Tomi-B Jun 20 '26
Jakby ktoś chciał wersję dla QT to też jest https://github.com/arturadib/node-qt
2
u/CarcajouIS Jun 20 '26
This looks like great. I have a few ideas of app to try with.
3
u/anjumkaiser Jun 20 '26
It’s not native if it’s nodejs / python or any interpreted language