# A way of some kind to discover whats taking up the most in zig exe size?

**URL:** <https://ziggit.dev/t/a-way-of-some-kind-to-discover-whats-taking-up-the-most-in-zig-exe-size/16921>\
**Category:** Help\
**Tags:** language\
**Created:** [July 25, 2026, 1:11pm UTC](https://ziggit.dev/t/a-way-of-some-kind-to-discover-whats-taking-up-the-most-in-zig-exe-size/16921 "2026-07-25T13:11:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![devengel](https://ziggit.dev/letter_avatar_proxy/v4/letter/d/e36b37/32.png) [@devengel](https://ziggit.dev/u/devengel)\
**Post date:** [July 25, 2026, 1:11pm UTC](https://ziggit.dev/t/a-way-of-some-kind-to-discover-whats-taking-up-the-most-in-zig-exe-size/16921/1 "2026-07-25T13:11:12Z")

</div>

the emitted zig executable of my project is rather large considering its a small project still, 43 MB in debug mode, 32 MB for fast mode.

is there some tool that lets me look into the executable and get human-readable information on whats taking space? preferably in descending order.

---

<div class="post-metadata">

**Author:** ![pachde](https://ziggit.dev/user_avatar/ziggit.dev/pachde/32/2485_2.png) [@pachde](https://ziggit.dev/u/pachde)\
**Post date:** [July 25, 2026, 3:02pm UTC](https://ziggit.dev/t/a-way-of-some-kind-to-discover-whats-taking-up-the-most-in-zig-exe-size/16921/2 "2026-07-25T15:02:17Z")

</div>

The same way you examine any other EXE, independent of source language, for the target you’re using (which you haven’t mentioned).

---

<div class="post-metadata">

**Author:** ![WeeBull](https://ziggit.dev/user_avatar/ziggit.dev/weebull/32/6828_2.png) [@WeeBull](https://ziggit.dev/u/WeeBull)\
**Post date:** [July 25, 2026, 4:08pm UTC](https://ziggit.dev/t/a-way-of-some-kind-to-discover-whats-taking-up-the-most-in-zig-exe-size/16921/3 "2026-07-25T16:08:51Z")

</div>

On Linux, `nm --size-sort <filename>` will list out all the symbols in your file sorted by size (biggest at the bottom).

---

<div class="post-metadata">

**Author:** ![floooh](https://ziggit.dev/user_avatar/ziggit.dev/floooh/32/2989_2.png) [@floooh](https://ziggit.dev/u/floooh)\
**Post date:** [July 25, 2026, 4:44pm UTC](https://ziggit.dev/t/a-way-of-some-kind-to-discover-whats-taking-up-the-most-in-zig-exe-size/16921/4 "2026-07-25T16:44:14Z")

</div>

Bloaty McBloatface (yes it was really called that at one time) is pretty good, also lets you create diffs:

> **[GitHub - google/bloaty: Bloaty: a size profiler for binaries](https://github.com/google/bloaty)**
>
> Bloaty: a size profiler for binaries

Docs: [bloaty/doc/using.md at main · google/bloaty · GitHub](https://github.com/google/bloaty/blob/main/doc/using.md)

---

<div class="post-metadata">

**Author:** ![Sze](https://ziggit.dev/user_avatar/ziggit.dev/sze/32/496_2.png) [@Sze](https://ziggit.dev/u/Sze)\
**Post date:** [July 25, 2026, 6:05pm UTC](https://ziggit.dev/t/a-way-of-some-kind-to-discover-whats-taking-up-the-most-in-zig-exe-size/16921/5 "2026-07-25T18:05:06Z")

</div>

> [@devengel](#):
>
> 32 MB for fast mode.

also consider using `exe.strip = true` if you for example don’t care about having good stack traces.

If I remember correctly some people also manually strip the exe with external tools in such a way that you can re-add the symbol information later again, but I don’t have practical experience with that.

I think on windows that info is separate from the exe in the `.pdb` file anyway, so there it is already stored in a way where you don’t have to deploy the debug info and can access it separately.
