7 ms·
I was expecting the smallest binary possible from go
by codegladiator 2y ago
I was expecting the smallest binary possible from go
- ramon156 2y agoWhich, mind you, got me interested in go. I remember seeing a docker image of 4mb that ran a pretty well server. Not sure if it's still possible or what article it was.
- InvaderFizz 2y agoStill is. I made a basic http responder last week and it was under 4mb static compiled for a scratch docker container. I didn't even have to resort to compression, just stripped debug symbols.
- kortilla 2y agoA 3.25inch disk (the one that makes the well known save symbol) held 1.44 megabytes. These held entire graphical games and now we’re impressed when we can respond to an HTTP request in a binary that size. Something got lost…
- segfaltnh 2y agoFor a lot of newer compiled languages this comes down to static compilation. These aren't linking to any system libraries beyond the OS fundamentals. That and they have way more debug symbols than Comander Keen, probably.
- kunley 2y agoThere was no crypto stuff during the floppy times, and that's a lot of extra code
- brabel 2y agoThat's impressive. But perhaps this thing is even more impressive: https://redbean.dev/ https://redbean.dev/ It's a single-file webserver that is also a zip file, and that's also a multi-platform executable (that's right, you can run the same file on Windows, Linux, BSDs, MacOS and more). It even includes a Lua interpreter, SQLiteDB, JSON etc. And it's so fast it's unbelievable. Version 2.2 was only 2.2MB , but looks like version 3.0 has grown to 5.5MB, not sure what happened!