5 ms·
> Average exe is ~70-80MB (depends on your code) so it's lighter than most compilers I know it's JS not actually a compiler but a bundler that just packs node
by thot_experiment 1y ago
> Average exe is ~70-80MB (depends on your code) so it's lighter than most compilers
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)
- martinsnow 1y agoWhat's light enough when the average user in the western hemisphere has +300gb of storage? I'm just asking since a 512gb disk has become the standard when ordering a laptop.
- CleanCoder 1y agoThe amount of functionality an application provides should be the benchmark for the size rather than one's available disk space. I'm sitting on 20TB+ of available storage and anything over 1MB for a simple "Hello World" is excessive.
- johnisgood 1y agoWell, if we already could make something in 1 MB, why do we want to achieve the same thing with 100 MB? It is as if there is a mentality of "somehow the higher the size the better".
- kube-system 1y agoIn professional and enthusiast circles, yes, but I think you underestimate the popularity of cheap laptops. e.g. currently only 2 of the top 10 selling laptops on Amazon have >=300GB storage. https://www.amazon.com/Best-Sellers-Computers-Accessories-Laptop-Computers/zgbs/pc/565108/ 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.
- TimTheTinker 1y agoBun also supports this out of the box, and the overhead is likely a bit less (reportedly 30-40MB for a single `console.log` call with no further dependencies - I didn't verify that myself though). https://bun.sh/docs/bundler/executables 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.
- zamadatix 1y ago> reportedly 30-40MB for a single `console.log` call with no further dependencies - I didn't verify that myself though 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.
- deleted 1y ago[deleted]