# Stand alone binary executable

**URL:** <https://discourse.julialang.org/t/stand-alone-binary-executable/5026>\
**Category:** General Usage\
**Created:** [July 23, 2017, 2:03am UTC](https://discourse.julialang.org/t/stand-alone-binary-executable/5026 "2017-07-23T02:03:33Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![alfred](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alfred/32/1449_2.png) [@alfred](https://discourse.julialang.org/u/alfred)\
**Post date:** [July 23, 2017, 2:03am UTC](https://discourse.julialang.org/t/stand-alone-binary-executable/5026/1 "2017-07-23T02:03:33Z")

</div>

Hello,

I usually have [pyInstaller](http://www.pyinstaller.org/) in hand to help me out with the distribution of my Python projects. It also allows me some sort of protection with my commercial Python scripts (my company keeps the source code private from our customers).

Is there any plan to have a stand alone binary executable (AOT compiling) for Julia?

TIA

---

<div class="post-metadata">

**Author:** ![ihnorton](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ihnorton/32/26_2.png) [@ihnorton](https://discourse.julialang.org/u/ihnorton)\
**Post date:** [July 23, 2017, 2:04am UTC](https://discourse.julialang.org/t/stand-alone-binary-executable/5026/2 "2017-07-23T02:04:11Z")

</div>

See

> [@Julia static compilation](https://discourse.julialang.org/t/julia-static-compilation/296):
>
> Hi! I’m loving Julia and I have built optimization algorithms with it that are blazingly fast (runtime and development!) and I don’t see any reason to port them into C/C++ or similar for speed-up reasons. What I would need in the future is the static compilation of Julia programs. I read somewhere that it is in the works at some capacity but I haven’t seen any estimates when it would be ready for use somewhat easily without much of a hassle? Sorry if this has been asked many times before… Edi…

---

<div class="post-metadata">

**Author:** ![malmaud](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/malmaud/32/29_2.png) [@malmaud](https://discourse.julialang.org/u/malmaud)\
**Post date:** [July 23, 2017, 2:16am UTC](https://discourse.julialang.org/t/stand-alone-binary-executable/5026/3 "2017-07-23T02:16:02Z")

</div>

Just FYI, it’s pretty simple to extract the source files from pyinstaller exe’s. See e.g. [PyInstaller Extractor download | SourceForge.net](https://sourceforge.net/projects/pyinstallerextractor/).

---

<div class="post-metadata">

**Author:** ![alfred](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alfred/32/1449_2.png) [@alfred](https://discourse.julialang.org/u/alfred)\
**Post date:** [July 23, 2017, 2:19am UTC](https://discourse.julialang.org/t/stand-alone-binary-executable/5026/4 "2017-07-23T02:19:21Z")

</div>

Yeap I know… pls, don’t tell my boss about it.  
😉

---

<div class="post-metadata">

**Author:** ![malmaud](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/malmaud/32/29_2.png) [@malmaud](https://discourse.julialang.org/u/malmaud)\
**Post date:** [July 23, 2017, 2:19am UTC](https://discourse.julialang.org/t/stand-alone-binary-executable/5026/5 "2017-07-23T02:19:55Z")

</div>

Ok 🙂

---

<div class="post-metadata">

**Author:** ![ScottPJones](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/scottpjones/32/146_2.png) [@ScottPJones](https://discourse.julialang.org/u/ScottPJones)\
**Post date:** [July 23, 2017, 3:12pm UTC](https://discourse.julialang.org/t/stand-alone-binary-executable/5026/6 "2017-07-23T15:12:20Z")

</div>

This is going to become an issue for us as well.  
Previously, our model was that all of our code (the core code with the really important stuff that the founder doesn’t want ripped off is written in Julia) was only going to be at our own data centers, but now a big company wants to to use their equipment / data centers, so he have to think about how we can the code.  
We’d probably be fine if we could just ship with the .ji precompiled code for most of the modules, if that would work without the source available.

---

<div class="post-metadata">

**Author:** ![alfred](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alfred/32/1449_2.png) [@alfred](https://discourse.julialang.org/u/alfred)\
**Post date:** [July 23, 2017, 11:00pm UTC](https://discourse.julialang.org/t/stand-alone-binary-executable/5026/7 "2017-07-23T23:00:58Z")

</div>

@ScottP, we are in agreement with that. This is going to become an issue sooner or later…

---

<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:** [July 23, 2017, 11:12pm UTC](https://discourse.julialang.org/t/stand-alone-binary-executable/5026/8 "2017-07-23T23:12:06Z")

</div>

> [@alfred](#):
>
> @ScottP, we are in agreement with that. This is going to become an issue sooner or later…

I am not sure why this keeps being said, especially given the other dynamic language (R/Python/MATLAB) don’t do AOT compilation at all. Instead they just build executables which bundle a script with the interpreter. Sounds like you’re really just asking for this instead:

> **[GitHub - dhoegh/BuildExecutable.jl: Build a standalone executables from a...](https://github.com/dhoegh/BuildExecutable.jl)**
>
> Build a standalone executables from a Julia script - GitHub - dhoegh/BuildExecutable.jl: Build a standalone executables from a Julia script

(which might need an update)

---

<div class="post-metadata">

**Author:** ![Per](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/per/32/10387_2.png) [@Per](https://discourse.julialang.org/u/Per)\
**Post date:** [July 24, 2017, 11:44am UTC](https://discourse.julialang.org/t/stand-alone-binary-executable/5026/9 "2017-07-24T11:44:00Z")

</div>

I think there’s a business opportunity here. If someone would make a closed-source fork of Julia that could run encrypted source files, then he could probably make a bit of money from every company that wanted to distribute closed-source software or libraries written in Julia.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [July 24, 2017, 12:20pm UTC](https://discourse.julialang.org/t/stand-alone-binary-executable/5026/10 "2017-07-24T12:20:14Z")

</div>

The key would need to be available to make it run, so I don’t see how that improves much.

---

<div class="post-metadata">

**Author:** ![Per](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/per/32/10387_2.png) [@Per](https://discourse.julialang.org/u/Per)\
**Post date:** [July 24, 2017, 12:28pm UTC](https://discourse.julialang.org/t/stand-alone-binary-executable/5026/11 "2017-07-24T12:28:51Z")

</div>

The situation would be similar to that of `.p` files in Matlab. In theory, if you spent enough time, you could probably reverse-engineer it. (The key must be in there somewhere, otherwise the code wouldn’t run.) But in practice it’s not worth the effort for most people.

---

<div class="post-metadata">

**Author:** ![RoyiAvital](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/royiavital/32/571_2.png) [@RoyiAvital](https://discourse.julialang.org/u/RoyiAvital)\
**Post date:** [July 24, 2017, 12:29pm UTC](https://discourse.julialang.org/t/stand-alone-binary-executable/5026/12 "2017-07-24T12:29:07Z")

</div>

This feature was asked over and over on [List of most desired features for Julia v1.x](https://discourse.julialang.org/t/list-of-most-desired-features-for-julia-v1-x/4481).

I think the solution should be composed of 2 steps:

1. Allow something like [MATLAB’s p File](https://www.mathworks.com/help/matlab/ref/pcode.html). Maybe it should be only on JuliaPro or something like that. Probably even someone could create a package to allow similar functionality with user own key or something like that.
2. Something like MATLAB Compiler to allow creation of a full independent application (Executable).

### Update

The reason I wrote it might be only by Julia Pro isn’t in order to put it behind paywall.  
The idea was that someone needs to embed the key in the engine and not tell the rest of the world and they are the one who distribute binaries.

If there’s a way to do it otherwise (Each one creates its own key yet the code can somehow be shared) it would have been even better.

---

<div class="post-metadata">

**Author:** ![malmaud](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/malmaud/32/29_2.png) [@malmaud](https://discourse.julialang.org/u/malmaud)\
**Post date:** [July 24, 2017, 1:51pm UTC](https://discourse.julialang.org/t/stand-alone-binary-executable/5026/13 "2017-07-24T13:51:20Z")

</div>

The two great feature requests: A Julia obfuscator, and a Julia beautifier.

---

<div class="post-metadata">

**Author:** ![ExpandingMan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/expandingman/32/866_2.png) [@ExpandingMan](https://discourse.julialang.org/u/ExpandingMan)\
**Post date:** [July 24, 2017, 3:37pm UTC](https://discourse.julialang.org/t/stand-alone-binary-executable/5026/14 "2017-07-24T15:37:59Z")

</div>

I just want to point out how depressing it is that we live in a world where obfuscating code is such a high priority for so many people. (No offense to those people, I might be in that position some day too, at which time I’ll repeat this comment.)

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [July 24, 2017, 4:11pm UTC](https://discourse.julialang.org/t/stand-alone-binary-executable/5026/15 "2017-07-24T16:11:52Z")

</div>

I really like the idea that this becomes a paid for feature. Julia Computing should just offer a product that does this and charge for it.

---

<div class="post-metadata">

**Author:** ![ExpandingMan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/expandingman/32/866_2.png) [@ExpandingMan](https://discourse.julialang.org/u/ExpandingMan)\
**Post date:** [July 24, 2017, 4:25pm UTC](https://discourse.julialang.org/t/stand-alone-binary-executable/5026/16 "2017-07-24T16:25:15Z")

</div>

While I kind of like that idea, I suspect economic reality makes this impossible. One can already create free Python stand-alone binaries, and it is hard enough to convince people to switch from Python without a pay-wall.

---

<div class="post-metadata">

**Author:** ![malmaud](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/malmaud/32/29_2.png) [@malmaud](https://discourse.julialang.org/u/malmaud)\
**Post date:** [July 24, 2017, 6:38pm UTC](https://discourse.julialang.org/t/stand-alone-binary-executable/5026/17 "2017-07-24T18:38:35Z")

</div>

Bundling of Julia and source files for ease of distribution purposes should be free. Obfuscation of Julia code is only really valuable to commercial entities, who should be willing to pay.

---

<div class="post-metadata">

**Author:** ![datnamer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/datnamer/32/3471_2.png) [@datnamer](https://discourse.julialang.org/u/datnamer)\
**Post date:** [July 24, 2017, 10:38pm UTC](https://discourse.julialang.org/t/stand-alone-binary-executable/5026/18 "2017-07-24T22:38:03Z")

</div>

I disagree completely. Open and free static compilation capability would benefit the overall Julia and scientific ecosystem in three major ways: Major competitive advantage over python and will allow Julia to compete with Go, Rust and newer compiled languages for dev ops, web assembly apps, increasing adoption and helping scientific devs with better general purpose compute tools.

Two, static compilation with WASM output so researchers and other people can tweak and mess around with model parameters without having to install Julia.

Three, Compiling shared libs for use from other frameworks. I’d like to use Julia to build free software that matlab and python users can call, but right now this is cumbersome or impossible.

---

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [July 24, 2017, 10:55pm UTC](https://discourse.julialang.org/t/stand-alone-binary-executable/5026/19 "2017-07-24T22:55:06Z")

</div>

Yes, yes. Everybody wants this feature. It is already possible with some fuss. In the future it will be better, more convenient, more standalone, leaner – all of the things that everyone wants. The general desire for this feature has been duly noted: static compilation to standalone binaries is something people want ✔. It will get done. If someone wants to start working on it and contribute to that effort, great, then it will happen sooner! Further discussion of the subject that’s not accompanied by working code is unhelpful.

---

<div class="post-metadata">

**Author:** ![Jose\_Maria\_Galeano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jose_maria_galeano/32/27484_2.png) [@Jose\_Maria\_Galeano](https://discourse.julialang.org/u/Jose_Maria_Galeano)\
**Post date:** [December 12, 2017, 6:59pm UTC](https://discourse.julialang.org/t/stand-alone-binary-executable/5026/20 "2017-12-12T18:59:07Z")

</div>

This post was temporarily hidden by the community for possibly being off-topic, unfocused, inappropriate, or spammy.

[Next page](https://discourse.julialang.org/t/stand-alone-binary-executable/5026.md?page=2)
