Hacker News new | ask | show | jobs
by petetnt 1128 days ago
And NodeJS too https://nodejs.org/api/single-executable-applications.html
2 comments

Perhaps it's specific to the applications i've built, but pkg has _ALWAYS_ given me issues. The ideal is the packaged code Just Works as if you ran it with node, and in my experience pkg does not deliver in that regard.

Glad others are finding value there, but i wish it was more of a drop-in replacement for `node <script.js>`. Feels similar to `ts-node` (always having issues) and `tsx` (just works).

Produces smaller binaries than bun too-- one of my applications, packaged by pkg for Windows, is about 70 MB (and actually does things; this isn't a Hello World). And it compresses well (must be including library sources in the binary as plain text); in a ZIP it's about 25 MB.

Still not small, but I'm not sure what Bun's doing to come out 20 MB larger than an app with actual functionality and dependencies (this one has express, sqlite, passport, bcrypt, and a bunch of others-- essentially everything you'd need for a web service).

Does anyone know of a good comparison of these bundling methods?
Experimental, so probably at least 5 years before it's considered "stable"
As if bun isn't experimental
Node moves pretty slow these days, I wouldn't be surprised if Bun's version gets stabilized before Node's
Which is probably a good thing. Node is starting to get firmly in the boring technology camp these days.
Has it ever moved fast? It's been at a steady pace for a long time.