Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I am definitely not as well-versed as you -- but for now I'd stick with Rust's statically linking nature. What I am more looking for is to have some very aggressive tree-shaking at the final phases of Rust compilation/linking where the tooling can prove that in your program, say, 73% of the stdlib isn't used at all so it can just remove it from the final binary.

It's my view that as deployment moves more and more to containers and even to the "microkernel + your app only" model then being able to fit binaries in CPU caches will become crucial for the viability of such cloud hosting. (Although to be fair, when we're talking about Rust + the Linux kernel, running something in 25ms vs 5ms can't be a huge deal for 98% of all apps, right?)



Pretty sure LTO already provides that functionality(I wish Rust had LTO on by default but it's fairly straightforward to flip on).


You can set LTO units to 1 which is what I do because it leads to some final binary size reduction -- but it isn't much. :(

I am aware that we have to start being more mindful of our dependencies but in commercial this is a luxury that you often don't have.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: