# About static compilation and static analysis

**URL:** https://discourse.julialang.org/t/about-static-compilation-and-static-analysis/87492
**Category:** Internals & Design
**Created:** [September 19, 2022, 8:30pm UTC](https://discourse.julialang.org/t/about-static-compilation-and-static-analysis/87492 "2022-09-19T20:30:44Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)
#### Post date: [September 19, 2022, 10:33pm UTC](https://discourse.julialang.org/t/about-static-compilation-and-static-analysis/87492/5 "2022-09-19T22:33:01Z")

</div>

Julia doesn’t need 2.0 to compile to binaries, since it’s already possible.

As you may know PackageCompiler.jl makes it possible (and while I’ve not used it recently, I understand it’s much improved in recent years, or was it only since Nov 2.0 version, since I used it).

You may want to look into non-default options with that packages, and new non-default options in Julia 1.8:

> - New option `--strip-metadata` to remove docstrings, source location information, and local variable names when building a system image ([#42513](https://github.com/JuliaLang/julia/issues/42513)).
> - New option `--strip-ir` to remove the compiler’s IR (intermediate representation) of source code when building a system image. The resulting image will only work if `--compile=all` is used, or if all needed code is precompiled ([#42925](https://github.com/JuliaLang/julia/issues/42925)).

> **[Is the Julia Language Worth Learning? (Pros and Cons)](https://www.matecdev.com/posts/julia-worth-learning.html)**
>
> Julia promises high-performing code and ease of use, but also has a few downsides. Is it worth learning it?

> Poor support for static compilation

That should have all features, e.g. threading and GC, and Windows ok. But you can also look at, without that:

> [@\[ANN\] StaticTools.jl: Enabling StaticCompiler.jl-based compilation of Julia code to standalone native binaries by avoiding GC allocations and \`llvmcall\`-ing all the things](https://discourse.julialang.org/t/ann-statictools-jl-enabling-staticcompiler-jl-based-compilation-of-julia-code-to-standalone-native-binaries-by-avoiding-gc-allocations-and-llvmcall-ing-all-the-things/80398):
>
> Technically this one has been registered for a couple months already, but we never made an announcement, so here goes! [GitHub - brenhinkeller/StaticTools.jl: Enabling StaticCompiler.jl-based compilation of (some) Julia code to standalone native binaries by avoiding GC allocations and llvmcall-ing all the things!](https://github.com/brenhinkeller/StaticTools.jl) I’ve just released version 0.3, which brings a lot of major changes. While it’s still a somewhat experimental package, I think it’s at least to some extent ready for other folks to use,…

> Tools to enable [StaticCompiler.jl](https://github.com/tshort/StaticCompiler.jl)-based static compilation of Julia code (or more accurately, a subset of Julia which we might call “unsafe Julia”) to standalone native binaries by avoiding GC allocations and `llvmcall`-ing all the things!

---

_[View the full topic](https://discourse.julialang.org/t/about-static-compilation-and-static-analysis/87492)._
