---
title: "Discussion on \"The Smallest Hello World Program\" | Hashnode"
description: "Discussion on \"The Smallest Hello World Program\". Understanding how executable binaries actually work"
url: "https://hashnode.com/posts/smol-hello-world/677290c55d99dadc639a0652"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [The Smallest Hello World Program](https://blog.lohr.dev/smol-hello-world?utm_source=hashnode&utm_medium=feed)

Understanding how executable binaries actually work

Dec 30, 2024 · 9 min read · blog.lohr.dev  
Updated Oct 3  
Read the article

-   [#developer](https://hashnode.com/tag/developer)
-   [#linux](https://hashnode.com/tag/linux)
-   [#software-development](https://hashnode.com/tag/software-development)
-   [#assembly](https://hashnode.com/tag/assembly)

## Written by

[Michael Lohr](https://hashnode.com/@michidk)

@michidk · Bavaria, Germany

  
[View profile](https://hashnode.com/@michidk)

Because a Great Idea Is Never Enough

Passionate about software development and architecture, web and cloud technologies, as well as game development.

## Responses 2

Markdown supported · ⌘↵ to post

[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.
