by thot_experiment · 1y ago · 0 comments
I know it's JS not actually a compiler but a bundler that just packs node in with your code, but I still had a nice laugh at 80mb being light. I suppose that's where the overton window is in a world of 1gb node_modules folders.
I wish there was a middle ground between this sort of thing and QuickJS (which is actually light, but has a lot of rough edges when it comes to its filesystem and network interfaces)
https://bun.sh/docs/bundler/executables
I suspect a large portion of the executable size in both cases is for the ICU library for localization support (Note QuickJS has its own, much smaller l10n library.) It's possible to download a Node binary without ICU, which could trim ~30MB.
I got a 110 MB exe for "console.log('test')" in "test.ts" using "bun build .\test.ts --compile --outfile test.exe". Pretty compressible though, on the order of 1/4th the size pretty easily. Considering it has zstd compression for sourcemaps that'd be an interesting option to add in.
I'm just asking since a 512gb disk has become the standard when ordering a laptop.
e.g. currently only 2 of the top 10 selling laptops on Amazon have >=300GB storage.
https://www.amazon.com/Best-Sellers-Computers-Accessories-La...
Cheap laptops with a Celeron, 4 GB RAM, and 64 GB storage have been incredibly popular since that formula became popular a handful of years ago. As are base-model MacBook Airs.