News for hackers. Stuff that matters.
Re:Making Rust binaries smaller by default by sestep on Wednesday January 24, 2024 @08:42AM (#39117217)
Are you sure? If so then this is awesome news, but I'm a bit confused; the commit in that min-sized-rust repo adding `build-std` to the README was merged in August 2021: https://github.com/johnthagen/min-sized-rust/pull/30

Are you saying that the feature still hadn't "landed in Rust nightly" until recently? If so then what's the difference between a feature just being available in Rust nightly, vs having "landed"?

The Cargo doc page on `build-std` says that it is an "unstable feature" which will only eventually end up in stable once it is stabilized: https://doc.rust-lang.org/cargo/reference/unstable.html#buil... and Kobzol's linked post above indicates that `build-std` is "sadly still unstable."

Re:Making Rust binaries smaller by default by nindalf on Wednesday January 24, 2024 @08:52AM (#39117327)
Yes, I am sure this is going to be a part of Rust 1.77.0 and it will release on 21st March. I say that because of the tag in the PR (https://github.com/rust-lang/cargo/pull/13257#event-11505613...).

I'm no expert on Rust compiler development, but my understanding is that all code that is merged into master is available on nightly. If they're not behind a feature flag (this one isn't), they'll be available in a full release within 12 weeks of being merged. Larger features that need a lot more testing remain behind feature flags. Once they are merged into master, they remain on nightly until they're sufficiently tested. The multi-threaded frontend (https://blog.rust-lang.org/2023/11/09/parallel-rustc.html) is an example of such a feature. It'll remain nightly only for several months.

Again, I'm not an expert. This is based on what I've observed of Rust development.

Re:Making Rust binaries smaller by default by sestep on Wednesday January 24, 2024 @08:54AM (#39117361)
Ah I see, I misunderstood: you were talking about `strip = "debuginfo"`, while I thought you were talking about `build-std`. Thank you for the link/clarification!
Re:Making Rust binaries smaller by default by pdimitar on Wednesday January 24, 2024 @09:04AM (#39117464)
Oof, here I have mistaken the simple strip debug stuff default flag with the `build-std` work which is much more complex. Sorry.