4 ms·
This seems really great! Reading it I didn't see anything about the size of the binary. How big is the resulting binary for a hello world type application?
by Tistron 5y ago
This seems really great!
Reading it I didn't see anything about the size of the binary.
How big is the resulting binary for a hello world type application?
- blackfawn 5y agoI can't speak to the Ruby details but I used to use the same author's node-packer, which was the same concept for Node.js. It uses libsquash to store the script source and replaces the REPL entrypoint to run the embedded source from the internal squashfs. The node.js binaries were about 50 MB which sounds large for hello world but the size would stay practically the same for a full featured application since everything is baked in already. I'd imagine the Ruby version is relatively similar in size but cannot say for sure.
- SilverRed 5y agoThe ruby 3.0 binary is 19MB so I would assume at least that big. I don't think there would be really any downsides to packing it in since the chance of the user having two ruby programs using the same ruby version are close to 0 anyway.
- Lio 5y agoI wonder if this could be combined with something like Sorbet Compiler[1] to help with final size? Personally I think I’d favour small static builds over linked binaries. 1. https://sorbet.org/blog/2021/07/30/open-sourcing-sorbet-compiler https://sorbet.org/blog/2021/07/30/open-sourcing-sorbet-comp...