I've just tried doing that, but it turns out to be basicaly a rust "wrapper" for C. I've got those results:
4776 B for no_std + C + no_main
257 KB for std + C + no_main
264 KB for std + no_main
282 KB for std
All with opt-level=z
I have also tried using just C, but that would require asembly to properly get rid of std, so the best I could achieve is 14KB with all the optimization I found and after stripping.
Yep, very weird, writing C inside Rust is better, than writing pure C. Reminder of how smart Cargo/rustc are!
Upd: 3680B with stripping
Upd: Just realized I needed to staticly link it for it to be fair. Wellp, 12864B now.
Haydon Ryan
I would love you to dive deep in to rust binaries. I have a feeling that there needs to be significant improvement in the final size of binaries (based of creating a hello world release binary of 310,040 bytes). I'm thinking that even with LTO it's not actually removing a bunch of unused library code.