Making Rust binaries smaller by default

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Stream - Scalable APIs for Chat, Feeds, Moderation, & Video.
Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.
getstream.io
featured
InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
  1. min-sized-rust

    🦀 How to minimize Rust binary size 📦

    It's really a shame that Rust includes the stdlib piecemeal in binary form, debug symbols and all, in every resulting binary.

    I do love Rust but binary sizes have always annoyed me greatly and I always had this nagging feeling that part of all programmers don't rake Rust seriously because of that. And I actually have witnessed, several times in the last 2-ish years, older-school programmers berate and ignore Rust on that basis alone (so the author is quite right to call this out as a factor).

    Looking at the https://github.com/johnthagen/min-sized-rust repo, final binary size of 51 KB when compilation / linking / stripping takes stdlib into account (and not just blindly copy-pasting the 4MB binary blob) is acceptable and much more reasonable. I wouldn't care for further micro-optimizations e.g. going to 20KB or even 5KB (further down the README file).

    I also don't use nightly in my Rust work so I guess I'll have to wait several more years. :(

  2. Stream

    Stream - Scalable APIs for Chat, Feeds, Moderation, & Video. Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.

    Stream logo
  3. Cargo

    The Rust package manager

    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.

  4. rust

    Empowering everyone to build reliable and efficient software.

    It's funny that it was already considered be “only pay for what you use” when the binaries contained half of H. P. Lovecraft's œuvre.

    See issue #13871

    https://github.com/rust-lang/rust/issues/13871

    I exaggerate, point is that we've come a long way and are still getting better.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • You can't do that because I hate you

    9 projects | news.ycombinator.com | 28 Dec 2023
  • Is there something "different" about Cargo's resolver in GitHub Actions?

    3 projects | /r/rust | 27 Jun 2023
  • Sudden 99% + Build Time Improvement Going from 1.66.1 to 1.71.0

    3 projects | /r/rust | 3 May 2023
  • Is it possible to make Rust Foundation powerless? Or to dismantle it?

    2 projects | /r/rust | 8 Apr 2023
  • Does Cargo's new sparse protocol save our disk space?

    2 projects | /r/rust | 11 Mar 2023

Did you know that Rust is
the 5th most popular programming language
based on number of references?