logoalt Hacker News

surajrmalyesterday at 2:23 PM2 repliesview on HN

The size is not fixed. It changes based on how much of the standard library you use. Dynamically linking the standard library is also a valid option in many cases.


Replies

galangalalgolyesterday at 5:18 PM

Posted elsewhere but The default hello world stripped with one codegen unit and panic=abort was 342kB both nightly and stable. Adding lto dropped it 42kB in stable and 40kB in nightly. Adding build-std and only building core did not reduce it any further in size.

show 1 reply
galangalalgolyesterday at 2:50 PM

Can it do lto on stdlib even without the nightly build-std flag?