---
title: "Comment by Haydon Ryan on \"The Smallest Hello World Program\" | Hashnode"
description: "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 creat"
url: "https://hashnode.com/posts/smol-hello-world/677290c55d99dadc639a0652/comment/68b46d4c9173359789f155cd"
---

[Discussion](https://hashnode.com/posts/smol-hello-world/677290c55d99dadc639a0652)

Comment [The Smallest Hello World Program](https://hashnode.com/posts/smol-hello-world/677290c55d99dadc639a0652)

[Haydon Ryan](https://hashnode.com/@haydonryan)

[Aug 31, 2025](https://hashnode.com/posts/smol-hello-world/677290c55d99dadc639a0652/comment/68b46d4c9173359789f155cd)

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.

[Silver Fairies](https://hashnode.com/@silverfairies)

[Sep 18](https://hashnode.com/posts/smol-hello-world/677290c55d99dadc639a0652/comment/68b46d4c9173359789f155cd#reply-6aad7618030b9a852d5e1a6b)

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.
