News for hackers. Stuff that matters.
Re:Why is a Rust executable large? (2016) by Grollicus on Thursday May 16, 2019 @08:10AM (#19928164)

  $ cargo --version && cargo init hello && cd hello && cat ./src/main.rs && cargo build --release && du -h ./target/release/hello
  cargo 1.34.0 (6789d8a0a 2019-04-01)
       Created binary (application) package
  fn main() {
      println!("Hello, world!");
  }
     Compiling hello v0.1.0 (/tmp/foo/hello)
      Finished release [optimized] target(s) in 0.31s
  1,6M ./target/release/hello

Edit:

  $ strip target/release/hello && du -h ./target/release/hello
  192K ./target/release/hello
Re:Why is a Rust executable large? (2016) by aasasd on Friday May 17, 2019 @05:24AM (#19937776)
Note that, while it doesn't matter much in this case, with `du` you'll get ~±4Kb out of nowhere because it measures by fs blocks. You need `--apparent-size` for the file size―which doesn't exist in the BSD version (= MacOS version).
Re:Why is a Rust executable large? (2016) by the8472 on Thursday May 16, 2019 @12:17PM (#19930334)
164K after fat lto, Os, panic=abort and stripping on nightly 2019-05-12