# Julia static compilation

**URL:** <https://discourse.julialang.org/t/julia-static-compilation/296>\
**Category:** General Usage\
**Tags:** question\
**Created:** [November 14, 2016, 5:43pm UTC](https://discourse.julialang.org/t/julia-static-compilation/296 "2016-11-14T17:43:21Z")\
**Posts on this page:** 1\
**Showing post:** 17

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [April 12, 2017, 4:23pm UTC](https://discourse.julialang.org/t/julia-static-compilation/296/17 "2017-04-12T16:23:08Z")

</div>

> [@MatthiasErdmann](#):
>
> I’m a little confused that in order to switch from Matlab and Python – both dynamic languages without static compilation – it’s a requirement to have static compilation. What exactly is the requirement? Is it about type checking, code generation, or bundling of dependencies? These are all pretty independent issues but often conflated under the umbrella of “static compilation”.

Read @joaquimg’s summary above. What you’re asking for isn’t static compilation: it’s compilation of a script to an executable that includes the Julia runtime. This is what MATLAB/Python/R do, which is why the resulting executables are large.

Julia can actually do something else as well: it can generate all of its compiled code and make that executable without Julia. This second case is static compilation, and is more akin to compiling C than it is to compiling MATLAB/Python/R. But it has more restrictions: it cannot do anything that requires the Julia runtime (no `@eval` and no `@generated`).

Either way it generates binaries that hide code. But they are different.

---

_[View the full topic](https://discourse.julialang.org/t/julia-static-compilation/296)._
