zlacker

[parent] [thread] 3 comments
1. zstscr+(OP)[view] [source] 2025-12-02 21:12:37
Every time I see people mention things like this in node vs bun or deno conversations I wonder if they even tried them.

>The single executable application feature currently only supports running a single embedded script using the CommonJS module system.

>Users can include assets by adding a key-path dictionary to the configuration as the assets field. At build time, Node.js would read the assets from the specified paths and bundle them into the preparation blob. In the generated executable, users can retrieve the assets using the sea.getAsset() and sea.getAssetAsBlob() APIs.

Meanwhile, here's all I need to do to get an exe out of my project right now with, assets and all:

> bun build ./bin/start.ts --compile --outfile dist/myprogram.exe

> [32ms] bundle 60 modules

> [439ms] compile dist/myprogram.exe

it detects my dynamic imports of jsons assets (language files, default configuration) and bundles them accordingly in the executable. I don't need a separate file to declare assets, declare imports, or do anything other than just run this command line. I don't need to look at the various bundlers and find one that works fine with my CLI tool and converts its ESM/TypeScript to CJS, Bun just knows what to do.

Node is death through thousand cuts compared to the various experiences offered by Bun.

Node adds quite the startup latency over Bun too and is just not too pleasant for making CLI scripts.

replies(1): >>heldri+Ri
2. heldri+Ri[view] [source] 2025-12-02 22:59:11
>>zstscr+(OP)
I agree, they seem to have never tried it at all! Bun DX is the best, and Bun is the trend setter. Others are just catching up!
replies(1): >>LunaSe+S53
◧◩
3. LunaSe+S53[view] [source] [discussion] 2025-12-03 19:28:25
>>heldri+Ri
Yeah, just switch to a non-NPM compatible and inexistant ecosystem just because you need to specify a few parameters in a config.

Anthropic is trying to IPO at a valuation of $300B so if their engineers nor their AI can be bothered to do this then maybe they're not as good as they think they are.

replies(1): >>zstscr+cj4
◧◩◪
4. zstscr+cj4[view] [source] [discussion] 2025-12-04 03:31:25
>>LunaSe+S53
>Yeah, just switch to a non-NPM compatible and inexistant ecosystem just because you need to specify a few parameters in a config.

Yeah.. you do not know what you are talking about.

I run my test suites on both node and bun because I prefer to maintain compatibility with node and it works just fine. I use some of bun's APIs, like stringWidth and have a polyfill module that detects if it's not bun and loads an alternative library through a dynamic import.

Not NPM compatible? Bun is literally a drop in for NPM, in fact you could use it solely as a replacement for NPM and only use node for actual execution if that's your thing. It's much faster to run bun install than npm install and it uses less disk space if you have many projects.

The developer experience on bun is so much better it isn't funny. It remains prudent, I would agree, to not depend too heavily on it, but Bun is many things: a runtime, a set of additional APIs, a replacement for the dogslow npm, a bundler etc. Pick the parts that are easily discarded if you fear Bun's gonna go away, and when using their APIs for their better performance write polyfills.

>Anthropic is trying to IPO at a valuation of $300B so if their engineers nor their AI can be bothered to do this then maybe they're not as good as they think they are.

Or maybe you should have a cold hard look in front of the mirror first and think twice before opening your mouth because the more you write the more the ignorance is shown.

[go to top]