# Why can we not easily compile to standalone binary?

**URL:** <https://discourse.julialang.org/t/why-can-we-not-easily-compile-to-standalone-binary/101936>\
**Category:** General Usage\
**Created:** [July 22, 2023, 5:37pm UTC](https://discourse.julialang.org/t/why-can-we-not-easily-compile-to-standalone-binary/101936 "2023-07-22T17:37:02Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Sukera](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Sukera](https://discourse.julialang.org/u/Sukera)\
**Post date:** [July 22, 2023, 5:45pm UTC](https://discourse.julialang.org/t/why-can-we-not-easily-compile-to-standalone-binary/101936/2 "2023-07-22T17:45:41Z")

</div>

There’s a number of threads on this, but I quite like this one - and I’m shamelessly linking to my own answer for why that’s a bit difficult 🙂

> [@Could Someone Explain To Me the Desire for Small Julia Binaries?](https://discourse.julialang.org/t/could-someone-explain-to-me-the-desire-for-small-julia-binaries/96484/17):
>
> One aspect that hasn’t been mentioned so far, and that to me is a reason why I don’t think it’s just 30-1000 LOC change with pkgimages like @tim.holy thinks, is cross compilation. In essence, cross compilation means compiling a program for an architecture other than the one where the compiler is running. Currently, all julia compilation happens under the assumption that the code will run on the same machine as the compiler itself - PkgCompiler and StaticCompiler weaken that assumption a bit, to …

---

_[View the full topic](https://discourse.julialang.org/t/why-can-we-not-easily-compile-to-standalone-binary/101936)._
