3 ms·
> Putting numbers to things like this is a fuzzy business of course, but I'd be interested in comparing notes on some of them. Me too. I'm especially surprise
by codesections 6y ago
> Putting numbers to things like this is a fuzzy business of course, but I'd be interested in comparing notes on some of them.
Me too. I'm especially surprised that Rust gets a 1.0 for size ("What’s the size impact of this language on the framework we would deliver for our customers?"). For comparison, C also got a 1.0 and Go got a 0.3. I _far_ prefer working in Rust to working in either Go or C, but my experience hasn't been that Rust binaries are anywhere near as small as equivalent C ones.
- maccam94 6y agoHave you tried making them small? Rust doesn't optimize programs for size by default, there's a lot of easy ways to shrink binaries (like stripping symbols). https://github.com/johnthagen/min-sized-rust https://github.com/johnthagen/min-sized-rust
- codesections 6y ago> Have you tried making them small? Rust doesn't optimize programs for size by default, there's a lot of easy ways to shrink binaries (like stripping symbols). Yeah, I have. I'd come across the guide you linked, any frequently use the subset of those techniques that are available on stable Rust. And I've ended up with simple CLI apps in the 2 to 4 MiB range – which is _fine_ for my use-case, but a bit closer to the size of a Go binary than a C one. (Though, like I said, it's fine for my use case and, if it were important to me, I'm sure I could trim that a bit by picking different dependencies or even dropping to `no_std` in some cases)