schtobia, German

Habe gerade die größe von verschiedenen -Snippets verglichen.

  • C++: 1,7 MiB (mit -O3 -s -static -static-libgcc -static-libstdc++)
  • Rust: 11 MiB. 🤯
    [edit]
  • Go: auch 1,7 MiB

kornel,
@kornel@mastodon.social avatar

@schtobia Static Rust hello world is about 350KB. Compile with --release and strip debug info.

https://github.com/johnthagen/min-sized-rust

schtobia,

@kornel ah, thanks! But this is not even everything, since it is still dynamically linked against libgcc, libc, linux-vdso. A "real" static binary still accounts for around 1.2 MiB.

pasties,

@schtobia @kornel actually if you follow those instructions it won't be linked against anything. You don't even have to do nearly all of them to get to a static binary.

Also get out of here with this "real binary" garbage. It's a compiled binary that runs and was produced by the compiler you're arguing against. You don't get to move the goal post because you're wrong.

kornel,
@kornel@mastodon.social avatar

@pasties @schtobia Dude, there's no need for such harsh language.

There are many options to trim executables even more, in both Rust and C. But it's not unreasonable to expect common/simple ways to be efficient.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • rust
  • ngwrru68w68
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • anitta
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • provamag3
  • tester
  • Leos
  • megavids
  • JUstTest
  • All magazines