News for hackers. Stuff that matters.
Re:Bun v0.6.0 – Bun's new JavaScript bundler and minifier by VWWHFSfQ on Tuesday May 16, 2023 @04:56PM (#35967658)
I'm curious why that would be so big. Even my python3.10 binary + /usr/lib/python3.10 is only 30MB
Re:Bun v0.6.0 – Bun's new JavaScript bundler and minifier by matlin on Tuesday May 16, 2023 @04:57PM (#35967666)
It bundles an entire JS engine with it. I think JSC in Bun's case. V8 for Deno and Node.
Re:Bun v0.6.0 – Bun's new JavaScript bundler and minifier by ricardobeat on Tuesday May 16, 2023 @05:29PM (#35968031)
The engine is not the largest part of it. just-js, which is pretty close to barebones V8, sits at ~20MB. JSC is supposed to be about 4MB, Hermes is 2-3MB. The largest parts I think are ICU and the built-in libraries.
Re:Bun v0.6.0 – Bun's new JavaScript bundler and minifier by billywhizz on Tuesday May 16, 2023 @08:46PM (#35969886)
yes. author of just-js here. a minimal build of a v8 based runtime weighs in around 23-25 MB on modern linux using latest v8. this gets bigger all the time, due to new functionality being added to JS/V8 and no easy way to decide what parts of JS to include. when i started working on just-js ~3.5 years ago i'm pretty sure it was only 15MB or so - can verify when i have time.
Re:Bun v0.6.0 – Bun's new JavaScript bundler and minifier by billywhizz on Tuesday May 16, 2023 @10:55PM (#35970749)
i just tried recompiling v0.0.2 (https://github.com/just-js/just/releases/tag/0.0.2) of just-js and comparing it to current. for the completely static build on ubuntu 22.04 i see following:

0.0.2 (v8 v8.4.371.18) - file size: 15.2 MB, startup RSS: 8.4 MB current (v8 v10.6.194.9) - file size: 19.5 MB, startup RSS: 12.3 MB

so, that's roughly 30% binary size increase and 50% greater startup memory usage in 2.5 years. =/