logoalt Hacker News

chrisco255today at 10:29 AM2 repliesview on HN

How big does a hello world binary compile to with this?


Replies

mrigheletoday at 11:48 AM

Just tried their hello world

* npx electrobun init

* [choose hello-world]

* bun install

* bun run build

This generates in linux a folder that takes about 60M [1] (mostly the "bun" executable)

[1] du says 60M, ls says 100M, maybe it is a sparse file ?

merlindrutoday at 11:40 AM

afaik its around 14MB but the large majority of that is the Bun runtime itself. at some point it will likely be possible to pick and choose parts of the runtime to include in the binary. thus the bundle size could get a lot smaller in the future

that said electrobun's author has published a bsdiff implementation in zig, and thats used for electrobun's updater. that means you download deltas, not the entire application bundle, every time you push an update to your users. and then it gets patched in-place.

this makes updates tiny, to the tune of a couple kB